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

oops-9299 40 Reputation points
2023-03-10T09:09:25.39+00:00

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
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,592 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 36,896 Reputation points
    2023-03-10T09:50:20.0066667+00:00

    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