a guest Jun 16th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $azureAplicationId ="<your ad app application id>"
- $azureTenantId= "<your tenant id>"
- $azurePassword = ConvertTo-SecureString "<the secret of your ad app>" -AsPlainText -Force
- $psCred = New-Object System.Management.Automation.PSCredential($azureAplicationId , $azurePassword)
- Connect-AzAccount -Credential $psCred -TenantId $azureTenantId -ServicePrincipal
- #I just test to get all groups, you could do other operations
RAW Paste Data