Need admin approval

Qian, Matthew 1 Reputation point
2022-01-19T07:36:24.187+00:00

Hi all,

I am a developer and I am following the tutorial for microsoft graph in java https://learn.microsoft.com/en-us/graph/tutorials/java. This is for a work project.

Running into an issue with authentication which I just cannot figure out.

166224-image.png

Additional info:

  • I have registered the app on azure AD using my personal outlook account (my work microsoft azure account restrict me from registering my app)
  • I am attempting to run the code and provide my work microsoft login since this will be for the wider company employees

What I have tried:

  • restricting scope to only permissions which do not require admin consent in both code and azure AD (user.read)
    166245-image.png
  • Used microsoft graph explorer, which works after simply logging in and grants access and token for the same permission
    166189-image.png
  • tried to configure enterpriseApplications/userSettings however it simply does not load (stuck) (tried with different personal accoutns, devices and browsers)
    166216-image.png
  • tried to access User/usersettings with the following error (also tried on different devices etc) 166225-image.png

I am not an admin user nor do I have the option of getting in contact with an admin.

Any ideas/suggestions would be greatly appreciated.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,744 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,831 Reputation points
    2022-01-19T10:45:58.73+00:00

    Hello, @Qian, Matthew , with my test, I found that the error is caused when the scope parameter in the authorization request contains permissions that require admin consent. So check whether the scope parameter in your code contains permissions that require administrator consent.

    166306-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.