Using Azure Graph API how do I trigger a 2FA push?
For example, Duo has an API /auth/v2/auth
which triggers a push/SMS/phone call/passcode request to a user. https://duo.com/docs/authapi#/auth
Twilio supports this via their "Verify v2" endpoint https://verify.twilio.com/v2/Services/{ServiceSid}/Verifications
https://www.twilio.com/docs/verify/api/verification
Where is Microsofts?
Note that: MFA is a part of the user journey, and it cannot be triggered, it can only be enabled. Refer this Microsoft Q&A by Jai Verma. MFA is triggered every time when user logs in and if the Azure AD user has MFA enabled
You can enable MFA either by Azure Portal, PowerShell or Conditional Policy.
For sample, using PowerShell you can enable MFA:
$mf= New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement
$mf.RelyingParty = "*"
$mfa = @($mf)
Set-MsolUser -UserPrincipalName "ruk@xxx.onmicrosoft.com" -StrongAuthenticationRequirements $mfa
When I tried to login with the user, got MFA prompt:
References:
Trigger/Invoke MFA request for specific user via PowerShell or other tool? - Microsoft Community Hub by ChrisAyers
Rest API to enable MFA - Microsoft Q&A by AmanpreetSingh-MSFT