I'm trying to update the preferred language of a user using the /me endpoint or the /users/{currentUserID} endpoint but this always throws:
403 "Insufficient privileges to complete the operation."
I have checked the permissions according to the documentation page and added the permissions for User.ReadWrite, User.ReadWrite.All, Directory.ReadWrite.All, Directory.AccessAsUser.All. This does not seem to have any effect. Is the documentation incorrect or are there still permissions missing?
The request works fine if I execute it with an azure ad administrator user.
EDIT: 2019-04-18
I did some more testing:
- I have created a new demo tenant using https://demos.microsoft.com
- I logged in graph explorer with the tenant admin account and gave admin consent for User.ReadWrite (and other default permissions asked by graph explorer).
- I logged in with the Demo User.
- I set the preferredlanguage to "en-US" using patch on https://graph.microsoft.com/v1.0/me/. This was successful.
- I tried to change the language again to "de-DE". This did not work:
"message": "Insufficient privileges to complete the operation.", "innerError": { "request-id": "d1d30483-a3da-4775-af5b-4a3dd9823f11", "date": "2019-04-18T07:40:27" }
Therefore it seems to work when setting the language for the first time. But updating it afterwards is impossible.