I want to get details of defaultUserRolePermissions resource type through Microsoft graph Api. I want that data shown in image below:
To get default user role permissions using Microsoft Graph API, you can run below graph query:
GET https://graph.microsoft.com/beta/policies/authorizationPolicy?$select=defaultUserRolePermissions
I have these settings configured for the users in my directory:
When I ran below query in Graph Explorer with Policy.Read.All
permissions, I got required details successfully in response like this:
GET https://graph.microsoft.com/beta/policies/authorizationPolicy?$select=defaultUserRolePermissions
Response:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#policies/authorizationPolicy(defaultUserRolePermissions)",
"value": [
{
"defaultUserRolePermissions": {
"allowedToCreateApps": true,
"allowedToCreateSecurityGroups": true,
"allowedToCreateTenants": true,
"allowedToReadBitlockerKeysForOwnedDevice": true,
"allowedToReadOtherUsers": true
}
}
]
}
Reference: Get authorizationPolicy - Microsoft Graph