Graph Explorer Insufficient privileges issue

Microsoft has released Graph Explorer preview, it’s fabulous to connect to all Microsoft collaboration tools in from one place. Very fast get and post operations.

I was creating an SharePoint webpart for which I needed my manager details(photo), unfortunately I was not able to make it using “SP.UserProfileProperties” so I explored graph instead.

Graph explorer preview API error message when I tried to retrieve other data like https://graph.microsoft.com/v1.0/me/manager. But when it worked for my data https://graph.microsoft.com/v1.0/me/

{“odata.error”:{“code”:”Authorization_RequestDenied”,”message”:{“lang”:”en”,”value”:”Insufficient privileges to complete the operation.”}}}

What I did?

  • Go to Graph Explorer preview
  • Logged into the site (page right option) using my Developer program credentials (Tenant administrator)
  • Sign in to Graph Explorer Authentication using same credentials. It logged in just like that without any prompt

But as I said Graph explorer API triggers worked when I tried to retrieve my own data, if I try others data, I got this insufficient access error message.

If you don’t get the consent pop ups then you will sure end up with the insufficient access error message in you Graph API when you trigger any actions directly or via from your code. Go to https://portal.azure.com à Active Directory à Enterprise Applications à Graph Explorer à Permissions à “Grant admin consent for cogsharepoint” (user domain name)

Now go back to browser logout all your sessions, better close them. Open a new session/window and login with the same credentials you did earlier. When “Sign in to Graph Explorer” it will prompt you for consent. Click ok. Then it works as charm!!!!

**** Please consider while doing this consent in production.

Thanks for reading my blog. Sharing is caring. #sharingiscaring