I am writing a backend application to update user in Azure AD by calling Microsoft Graph. The application is granted with permissions Directory.ReadWrite.All
and User.ReadWrite.all
.
When I send patch request to update businessPhones
of a specific user, successful response code 204
is returned if the businessPhones parameter is an empty collection, i.e. {"businessPhones":[]}
.
In case the parameter is not empty, e.g. {"businessPhones":["+86 (321) 456789"]}
, response code 403
is returned with the message "Insufficient privileges to complete the operation".
I have tried to patch for another user, there is no problems with both empty and non-empty businessPhones parameter.
I have found this SO question but Directory.AccessAsUser.All
is a delegated permission, which is not applicable to my application.
Any help would be appreciated.
Directory.ReadWrite.All
can now update thebusinessPhones
of an admin. – Johnny Yuen