I'm running the Get-AzADAppPermission
command to return a list of Web permissions a App registration has.
The output returns a GUID for the permissions.
How do I translate the output to English terms?
Get-AzADAppPermission -ObjectId cbXXXX80-c841-XXXX-XXXX-0eXXXXXXX6d6
Returns this:
I tried to reproduce the same in my environment and got the results like below:
I created an Azure AD Application and granted API permissions:
Now, I retrieved the API permissions by using the below command:
Connect-AzAccount
Get-AzADAppPermission -ObjectId ObjectID
To get the name of the API permission by its GUID try the below script:
$GraphPermissions = Get-AzureADServicePrincipal -Filter "DisplayName eq 'Microsoft Graph'"
$permissionId = "e1fe6dd8-ba31-4d61-89e7-88639da4683d"
$permission = $GraphPermissions.Oauth2Permissions | Where-Object { $_.Id -eq $permissionId }
$GraphPermissions = Get-AzureADServicePrincipal -Filter "DisplayName eq 'Microsoft Graph'"
$permissionId = "0e263e50-5827-48a4-b97c-d940288653c7"
$permission = $GraphPermissions.Oauth2Permissions | Where-Object { $_.Id -eq $permissionId }
The value of the GUID User.Read
and Directory.AccessAsUser.All
displayed successfully.
There is no direct command to fetch the Display Names of the API permissions using Get-AzADAppPermission
.