DanHalford
Jan 17, 2022Copper Contributor
Status:
New
Include support for viewing and changing the default authentication method in Graph API
Right now, the Graph API can list the Authentication methods configured for a user, but does not return which the user has configured as the default and does not allow setting of the default method. ...
gashford
Mar 21, 2022Copper Contributor
Strong agree.
This feature has been listed as "not yet supported" in the documentation seemingly forever: https://docs.microsoft.com/en-us/graph/api/resources/authenticationmethods-overview?view=graph-rest-beta
Setting the default authentication method can be done using Powershell module MSOnline as follows, but besides MSOL being a terrible module to use with automation, this method will no longer be supported come June 30, 2022.
# TwoWayVoiceAlternateMobile DEFAULT
$TwoWayVoiceAlternateMobile = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationMethod
$TwoWayVoiceAlternateMobile.MethodType = "TwoWayVoiceAlternateMobile"
$TwoWayVoiceAlternateMobile.IsDefault = $true
# TwoWayVoiceMobile NON-DEFAULT
$TwoWayVoiceMobile = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationMethod
$TwoWayVoiceMobile.MethodType = "TwoWayVoiceMobile"
$TwoWayVoiceMobile.IsDefault = $false
Set-MsolUser -UserPrincipalName $UPN –StrongAuthenticationMethods @($TwoWayVoiceMobile,$TwoWayVoiceAlternateMobile)
Microsoft needs to support setting the default authentication method via MS Graph.