Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. $azureAplicationId ="<your ad app application id>"
  2. $azureTenantId= "<your tenant id>"
  3. $azurePassword = ConvertTo-SecureString "<the secret of your ad app>" -AsPlainText -Force
  4. $psCred = New-Object System.Management.Automation.PSCredential($azureAplicationId , $azurePassword)
  5. Connect-AzAccount -Credential $psCred -TenantId $azureTenantId -ServicePrincipal
  6. #I just test to get all groups, you could do other operations
  7. Get-AzADGroup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement