Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Service Principles ====== I used the following Powershell commands to setup a session using a service principle. I also had to give the SP the //Reader// role over the scope over the subscription. <code> $appId = "xxxx" $clientSecret = $env:appsecret $securePassword = ConvertTo-SecureString -String $clientSecret -AsPlainText -Force $tenantId = "xxxx" $subscriptionId = "xxxx" $credential = New-Object -TypeName System.Management.Automation.PSCredential $appId, $securePassword Connect-AzAccount -ServicePrincipal -TenantId $tenantId -SubscriptionId $subscriptionId -Credential $credential </code> azure/service_principles.txt Last modified: 2024/11/05 20:55by mmuze