Created
September 23, 2025 11:30
-
-
Save FrankDeGroot/f48e64ecda0c890bea49ed3dbbdb9ebf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
steps: | |
- task: AzureCLI@2 | |
name: getSpnDetails | |
inputs: | |
azureSubscription: ${{parameters.AzureDevOpsServiceConnection}} | |
scriptType: pscore | |
scriptLocation: inlineScript | |
addSpnToEnvironment: true | |
inlineScript: | | |
Write-Host "##vso[task.setvariable variable=serviceConnectionClientId;secret]$($env:servicePrincipalId)" | |
Write-Host "##vso[task.setvariable variable=serviceConnectionObjectId;secret]$(az ad sp show --id $env:servicePrincipalId --query id --output tsv)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use Client ID / App ID / SPN ID to authenticate
Use Object ID to assign RBAC