2 users using Cert based Graph Auth - one works fine the other receives Request Auth Failed

Adorney, Frank 5 Reputation points
2024-01-19T13:07:39.0033333+00:00

When connecting with Cert based Auth. User 1 work perfectly, the next person they receive the following: Powershell 7.4.0 and all modules match for both users - same cert on both PCs and same scripts being used. Any Ideas? Could this be Azure role issue? User's image

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,685 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,000 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 45,106 Reputation points
    2024-01-26T09:06:21.2366667+00:00

    Hi @@Adorney, Frank

    Based on my testing, if your calling app has one of the UserAuthenticationMethod.Read.All or UserAuthenticationMethod.ReadWrite.All application permissions, then you should be able to retrieve the user's email authentication method, even if the target user has the Administrator role.

    Please try running the Get-MgContext command to see if you have the above permissions in your app-only context.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    0 comments No comments

Your answer

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