Last active
January 9, 2019 17:14
-
-
Save frankhu-2021/b5819944f848272765dd3e3a560c9180 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connect-azuread | |
$appname = "Your-App-Registration-Name" | |
$sp = Get-AzureADServicePrincipal -filter "DisplayName eq '$appname'" | |
$role = Get-AzureADDirectoryRole | |
For ($i=0; $i -lt $role.Count; $i++){ | |
if(Get-AzureADDirectoryRoleMember -ObjectId $role.Get($i) | | where {$_.DisplayName -eq $appname}) { | |
$role.DisplayName | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment