microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Get-MGBetaUser does not return any data in the Authentication property
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Describe the bug
When I run the Get-MgBetaUser cmdlet, the property Authentication in the returned object is empty. I am specifically interested in the Authentication\Requirements\PerUserMfaState property and that remains empty.
When I use Invoke-MgGraphRequest to use the Graph API, it returns the requested information just fine:
I also tried adding the "-Property Authentication" parameter to the cmdlet, but that didn't make any difference.
Expected behavior
Return the a fully populated object in the Authentication property
How to reproduce
(Get-MgBetaUser -UserId [GUID]).Authentication.Requirements
SDK Version
No response
Latest version known to work for scenario above?
2.26.1
Known Workarounds
Use the Invoke-MgGraphRequest cmdlet to call the API directly, but that is much slower since I then have to call into that API over and over again.
Debug output
Click to expand log
```</details>
### Configuration
- OS: Windows 11
- PS: v5.1 and v7.5.0
### Other information
I am using the Beta cmdlet, since the Requirements property in the Authentication property is not yet part of the v1.0 API.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Get-MgBetaUser -UserId [GUID] entry point and compare its returned Authentication.Requirements.PerUserMfaState with the response from Invoke-MgGraphRequest. Check how the beta cmdlet retrieves and exposes Authentication, then verify that the property is populated without needing repeated direct API calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100