-
Notifications
You must be signed in to change notification settings - Fork 173
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
MG PowerShell module should have similar permissions like the Graph Explorer #1378
Comments
@cnshenj, sorry for the delayed response. From the screenshot, it looks like you are using GE in the MSIT tenant. Please note that Graph Explorer is pre-consented for the permissions shared above in the MSIT tenant since it is a web app that uses a different authentication model (proxy-based auth). PowerShell on the other hand isn't pre-consented in the tenant because it is a 3p public app with incremental scope consent support. See the response at #684 (comment) for details. Even with pre-consent, an admin MUST first approve the app for admin permissions before you can use them. So, The recommendation we've gotten from the ACE team is that internal customers (I assume you are) should create their own appId with the required permissions and go through the ACE admin consent process. Once approved, you can use your app id with the module by invoking AzureAD uses a different authentication module that is not recommended for public apps like ours. |
Duplicate of #684. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
This is related to issue #1356. The answer in #1356 is not correct.
I am NOT an admin. I can use endpoints like
GET /servicePrincipals
orGET /servicePrincipals/{id}/appRoleAssignments
in Graph Explorer if I sign in with my own credentials.If I check the permissions needed for the same operation in MG PowerShell, all the scopes require admin consent.
The fact that Graph Explorer can use those endpoints proves that the permissions to call the graph API is properly granted. Inspecting the access token obtained by Graph Explorer, I see it has scope: "Directory.ReadWrite.All". The reason is that Graph Explorer has all the proper permissions granted. I can confirm this in Azure Portal:
Note that these are permission for "the app to call Graph API on user's behalf", it's not giving the user the permission they should not have. MG PowerShell must have an app registration of its own - and the app owner (not users) should get proper admin consent, just like Graph Explorer or AzureAD PowerShell,
The text was updated successfully, but these errors were encountered: