Skip to content

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

@Icybiubiubiu

Description

@Icybiubiubiu

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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions