Graph API: insufficient privileges to complete the operation(403)

oops-9299 40 Reputation points

Account synced from onprem ad.

I update user using graph api as Azure AD application to update user properties. Permissions are all User.ReadWrite.All, Directory.ReadWrite.All listed in the document.

Password, mobile phone, business phone, and accountenabled are all not set. The properties to include in the modification are as follows:
usageLocation, userPrincipalName, mailNickname

However, an error occurs in the efficient privileges to complete the operation (403). But if you try again over time, it succeed.
Do you know why it happens??

Microsoft Graph Users API
Microsoft Graph Users API
A Microsoft API that allows you to build compelling app experiences based on users, their relationships with other users and groups, and the resources they access for example their mails, calendars, files, administrative roles, group memberships.
881 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 28,691 Reputation points

    Hi @Heo Jaehyun

    This may be caused by delay, please do not try to get an access token immediately after you grant permissions and admin consent, it may take some time for the permissions to take effect, please wait half a minute or so and try again.

    Also, note that you must be an administrator to modify other users' information.

    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 additional answers

Sort by: Most helpful