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

Microsoft Graph - Listing all Microsoft Graph permissions exposed. Through Microsoft Graph Explorer
Microsoft Graph - Listing all Microsoft Graph permissions exposed. Through Microsoft Graph Explorer

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

Microsoft Graph Explorer
Fig : Microsoft 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
Microsoft Graph - Listing all Microsoft Graph permissions exposed. Through Microsoft Graph Explorer
Fig : Microsoft Graph – Listing all Microsoft Graph permissions exposed. Through Microsoft Graph Explorer

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

Prasham Sabadra

LIFE IS VERY BEAUTIFUL. ENJOY THE WHOLE JOURNEY :) Founder of Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.