Share via

Authentication method add

AdminAzure 1 Reputation point
2022-02-23T12:22:41.413+00:00

Hello, I developing application for high schools and app was integrated with Office 365.
Application is being developed in C# with microsoft graph beta api nuget package.
I have problem with adding authentication method on user.
I added next Delegated permissions

  • UserAuthenticationMethod.Read
  • UserAuthenticationMethod.Read.All
  • UserAuthenticationMethod.ReadWrite
  • UserAuthenticationMethod.ReadWrite

and aquire new acces token with these permissions, but request return next error:

{
"error": {
"code": "accessDenied",
"message": "Request Authorization failed",
"innerError": {
"message": "Request Authorization failed",
"date": "2022-02-23T19:26:28",
"request-id": "11975e07-****-****-****-***********",
"client-request-id": "11975e07-****-****-****-*********"
}
}
}

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Vasil Michev 127K Reputation points MVP Volunteer Moderator
    2022-02-23T12:52:14.063+00:00

    As mentioned in the documentation, delegated permissions require a matching admin role as well:

    For delegated scenarios where an admin is acting on another user, the admin needs one of the following Azure AD roles:

    Global administrator
    Privileged authentication administrator
    Authentication administrator

    So make sure you have all the necessary permissions. Other than that, share the exact request you're making.

    Was this answer helpful?

    1 person found 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.