Hi @Mubashar,This is not possible, you cannot know which admin provided consent. Its always the consentType Admin with no user details.
There is no specific entity which will tell you more about the admin. The userobjectID always comes empty. Please accept answer if it has helped , Thanks
Getting profile during admin consenting in nodejs
Mubashar Hussain
0
Reputation points
Hi Community,
I am Mubashar a full stack javascript developer. I am doing admin consent with a multitenant Azure app in Nodejs with the blow URL
`https://login.microsoftonline.com/common/adminconsent?grant_type=client_credentials&client_id=${process.env.MICROSOFT_APP_ID}&state=${state}&redirect_uri=${process.env.REDIRECT_URI}`
admin consent is successfully returned in my app on the given redirect uri but the profile of admin user is not getting for some reason. I would like to have the user details and tenant details of who has consented. I tried with the /me route from graph API but /me is for delegated users. Please help if I am doing wrong somewhere I will be very thankful.
Microsoft Security | Microsoft Graph
13,726 questions
1 answer
Sort by: Most helpful
-
Deepanshu katara 16,720 Reputation points MVP Moderator
2024-01-04T10:08:50.04+00:00