1

My application wants to access all users' mailboxes. For that, I am getting permission from Admin consent. Now I want to get the user details of the admin who consented to the application. I know we can't use Me context ('/me' API end-point) as we are getting consent without a signed-in user.

Is there any way by which we can get user details of the admin who consented to our application using the access token?

Thanks in advance.

2
  • Do you know the id of the user? Commented Apr 9, 2021 at 8:48
  • No, we don't have a user id. We need the user details of the admin who consented to the application. Please note I am using the application permissions only. Commented Apr 9, 2021 at 11:56

1 Answer 1

1

To the best of my knowledge, the access token does not contain user details of the admin who consented to your application. One way to get this information is by viewing activity reports in the Azure portal. You might also consider working with the activity reports API provided by Microsoft Graph.

Please let me know whether this helps and if you have further questions.

Sign up to request clarification or add additional context in comments.

1 Comment

I believe it won't work in my case. It is just a simple application to read and write events to the user's calendar within the organization. In this, I just have to show who consented to the application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.