Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling User.setProxyAddresses() results in "Insufficient privileges to complete the operation" even with elevated permissions #951

Open
Chris-AdamsonQHR opened this issue May 15, 2024 · 2 comments

Comments

@Chris-AdamsonQHR
Copy link

Expected behavior

Making a call to User.setProxyAddresses() succeeds when "User.ReadWrite.All" and "Directory.ReadWrite.All" application permissions are granted in the Azure portal with admin consent given.

Actual behavior

An exception is thrown:
com.microsoft.graph.beta.models.odataerrors.ODataError: Insufficient privileges to complete the operation.

Steps to reproduce the behavior

Using version 6.9.0 of the beta SDK:

  • Create a new user (post)
  • Attempt to update user (patch) with a call to setProxyAddresses() made first
  • Observe the error

Here are the permission settings we tried using in the Azure Portal:
image

We also set the application in Azure to both User Administrator and then Global Administrator without succcess.

Related

Patch request to do the same operation is the suggested operation via graph explorer:
https://stackoverflow.com/questions/65198916/remove-old-proxyaddress-entry-for-user-in-azure-active-directory/71577425#71577425

@petrhollayms
Copy link

Hi @Chris-AdamsonQHR ,

Looking at the Graph API docs: https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-beta#properties
proxyAddresses - Read-only in Microsoft Graph; you can update this property only through the Microsoft 365 admin center. Not nullable.

@petrhollayms petrhollayms self-assigned this May 29, 2024
@petrhollayms petrhollayms added the status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close label May 29, 2024
@Chris-AdamsonQHR
Copy link
Author

Hi @petrhollayms.
Thank you for looking at this. In the non-beta version of the SDK when we attempted to change the proxy address it indeed resulted in an error stating that the property was read only. However in the beta version, the same call resulted in an exception of insufficient privileges (as reported here).

With this different error, I was hoping that this property was no longer read-only, but from your description of the underlying documentation, would seem that it is still read-only (at least in the Graph API) and just that the error has changed.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close Status: no recent activity labels Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants