Use the /roleManagement/directory/roleDefinitions endpoint instead:
https://graph.microsoft.com/beta/roleManagement/directory/roleDefinitions?$select=id,displayName,isPrivileged
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am using https://graph.microsoft.com/v1.0/directoryRoleTemplates to pull all directory roles but I only want to get the privileged roles.
These are visible on the AzureAD portal under the privileged column but I can't find a way to get the data from the Microsoft Graph API, is this possible?
I can work around it by specifying the privileged role IDs in my script but would like to automate the process for any future changes or custom role additions.
Thanks
Use the /roleManagement/directory/roleDefinitions endpoint instead:
https://graph.microsoft.com/beta/roleManagement/directory/roleDefinitions?$select=id,displayName,isPrivileged
@Robert Cook Adding to the above answer, this graph query will help to achieve the desired result, which you are trying to do from the Azure Portal.
https://graph.microsoft.com/beta/roleManagement/directory/roleDefinitions?$filter=isPrivileged eq true
Let me know if you have any further questions, feel free to post back.