Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-MgBetaUserAuthenticationMethod : The term 'Get-MgBetaUserAuthenticationMethod' is not recognized with Microsoft.Graph and Microsoft.Graph.Beta. #3059

Open
Icybiubiubiu opened this issue Dec 23, 2024 · 3 comments
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience

Comments

@Icybiubiubiu
Copy link

Describe the bug

Trying to set MFAauthenticationMethod with MS Graph API.
If using "get-MgUserAuthenticationPhoneMethod -UserId", failed with no segment"phoneMethod"
image

If using "Get-MgBetaUserAuthenticationMethod -UserId", failed with "The term 'Get-MgBetaUserAuthenticationMethod' is not recognized "

Actually I have installed v2.25.0 and Beta.

Expected behavior

work as MG graph v1.0, could swith beta and set MFA.

Refer:
https://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-userdevicesettings

which works well with MS graph v.1.9.2, especially we can switch from V1.0 to Beta.

But wih the latest v.2.25.0, it always failed!!
1.failed to swith Beta
2.failed to directly run Beta cmds.

How to reproduce

1.install latest MSgraph SDK and Beta //v2.25.0
image

2.get-MFA

Connect-MgGraph -Scopes "User.Read.all","UserAuthenticationMethod.Read.All","UserAuthenticationMethod.ReadWrite.All" -ClientId "4bde0faf-fc44-4b3d-a179-638a5e885461" -Environment China -TenantId "4e6dc30d-0c78-4f1c-9d0e-252a335f25f6" -UseDeviceAuthentication
get-MgUserAuthenticationPhoneMethod -UserId xxxxx #on-prem
Get-MgBetaUserAuthenticationMethod -UserId xxxxx

SDK Version

2.25.0

Latest version known to work for scenario above?

1.9.2

Known Workarounds

NA

Debug output

Click to expand log ```
</details>


### Configuration

windows server 2019 
windows 11

### Other information

_No response_
@Icybiubiubiu Icybiubiubiu added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Dec 23, 2024
@Icybiubiubiu
Copy link
Author

also, I noticed someone mentioned
https://learn.microsoft.com/en-us/answers/questions/1331741/select-mgprofile-and-get-mgprofile-still-relevant
https://cloudiffic.com/select-mgprofile-is-not-recognized/

but as you can see they did not work! no way to change MFAmethod with phone

@Icybiubiubiu
Copy link
Author

I have resolved by using
https://learn.microsoft.com/en-us/powershell/module/Microsoft.Graph.Beta.Identity.SignIns/Get-MgBetaUserAuthenticationPhoneMethod?view=graph-powershell-beta

RCA:
SDK2.0 and beta are separated modules and could work independently.
image

@Icybiubiubiu
Copy link
Author

this issue could be closed as resolved. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

1 participant