question

EmileDawkins-0793 avatar image
0 Votes"
EmileDawkins-0793 asked ·

Graph API Permissions

Hello, I am giving support to a client While creating an Azure user from backend the user is facing the below error <?xml version=\"1.0\" encoding=\"utf-8\"?><error xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>Authorization_RequestDenied</code><message xml:lang=\"en\">Insufficient privileges to complete the operation.</message></error>" I have delegated microsft graph permission User.Invite.All to the user but they still receive the same error? Please can anyone assist. Thank you!

microsoft-graph-users
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

How are the calls being made to Graph and what endpoint is called? From the docs, User.Invite.All (which is for creating Guest Users) requires admin consent. You can also check that the permission is granted by admin.
I am able to create users and invitations with the permissions on Graph Explorer and using a AAD app registration.

0 Votes 0 ·
EmileDawkins-0793 avatar image
0 Votes"
EmileDawkins-0793 answered ·

@Danstan

The API they are using is below along with the tenant ID:

https://graph.windows.net/{tenantid}/users?api-version=1.6

Tenant ID :
adecc3d0-610d-4060-a865-615f7f48c411

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EmileDawkins-0793 avatar image
0 Votes"
EmileDawkins-0793 answered ·

Here is the error:

78749-accessapi.jpg



accessapi.jpg (320.7 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Danstan avatar image
0 Votes"
Danstan answered ·

I see that you are trying to consume https://graph.windows.net/{tenantid}/users?api-version=1.6 which is Azure AD Graph and not Microsoft Graph. User.Invite.All is an MS Graph permission. Check MS Graph Invitation docs and see if this is what you should be consuming.


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.