Tips and Tricks : Microsoft Graph – How to get all permission IDs for Microsoft Graph permissions

Hi All,
Greetings!!!
Today sharing one of the important small tip related to Microsoft Graph.
Details:
- There are scenarios where we need to know all Microsoft Graph permissions.
- For example we may need to set permissions using Azure CLI, PowerShell, in this scenarios we need permission identifier rather permission name.
- One of the options to read information about Microsoft Graph permissions programmatically is through GetServicePrincipal API in Microsoft Graph
- Following is the request
GET https://graph.microsoft.com/v1.0/servicePrincipals(appId='00000003-0000-0000-c000-000000000000')?$select=id,appId,displayName,appRoles,oauth2PermissionScopes,resourceSpecificApplicationPermissions
- In above request sample app id is given
- To test we could execute above request in Microsoft Graph Explorer
Steps to execute above request in Microsoft Graph Explorer
- Navigate to Microsoft Graph Explorer – https://developer.microsoft.com/en-us/graph/graph-explorer

- Here, we are using sample tenant and account to execute the requests
- Put the above request in “text box” in front of “Run Query” button and click on “Run Query.”
- Under “Response preview” tab we will see the result in JSON format
- It lists all the permissions available

Thanks for reading. HAVE a FANTASTIC LEARNING AHED ! LIFE IS BEAUTIFUL 🙂

You must be logged in to post a comment.