Created
January 7, 2019 20:11
-
-
Save frankhu-2021/877b14f2ef048ba64282a6ab530ee9c5 to your computer and use it in GitHub Desktop.
This file contains 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 | |
$SPObjectID = "your-spn-objectid" | |
$role = (Get-AzureADDirectoryRole).objectId | |
For ($i=0; $i -lt $role.Count; $i++){ | |
if(Get-AzureADDirectoryRoleMember -ObjectId $role.Get($i) | where {$_.objectId -eq $SPObjectID}) { | |
$role.DisplayName | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment