Created
October 13, 2020 20:56
-
-
Save matejskubic/d7a96b9e0b194d73ad75bac7e7318c2b to your computer and use it in GitHub Desktop.
Azure AD - Grant graph and cds
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
$rra = [System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.RequiredResourceAccess]]::new() | |
$ra = [Microsoft.Open.AzureAD.Model.RequiredResourceAccess]::new() | |
$ra.ResourceAppId = "00000003-0000-0000-c000-000000000000" # graph | |
$ra.ResourceAccess = [Microsoft.Open.AzureAD.Model.ResourceAccess]::new("e1fe6dd8-ba31-4d61-89e7-88639da4683d", "Scope") # User.Read | |
$rra.Add($ra) | |
$ra = [Microsoft.Open.AzureAD.Model.RequiredResourceAccess]::new() | |
$ra.ResourceAppId = "00000007-0000-0000-c000-000000000000" # CDS / Dynamics CRM | |
$ra.ResourceAccess = [Microsoft.Open.AzureAD.Model.ResourceAccess]::new("78ce3f0f-a1ce-49c2-8cde-64b5c0896db4", "Scope") #user_impersonation | |
$rra.Add($ra) | |
Set-AzureADApplication -ObjectId _guid_ -RequiredResourceAccess $rra |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Human resources - talent - HR (http://hr.talent.dynamics.com)