Share via

Graph API silent login auth with MFA enabled cause Bad requested

Steve Lei 1 Reputation point
2022-03-17T16:39:16.897+00:00

Hi,

My project has an autoprocessing console that would use Graph silent login to get auth token. Since the company starts to enable the MFA, it would cause the auth silent login call to get 400 - Bad Requested.

https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token

Like to hear some may have the same challenge and how to deal with it?

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Vasil Michev 127K Reputation points MVP Volunteer Moderator
    2022-03-17T17:30:08.82+00:00

    Use the client credentials flow, if possible: https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow
    If not possible, use the Device auth or ROPC.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.