I’m trying to do some cleanup (to solve other issues) within a yaml, and I’ve come up with this:
- task: AzureCLI@2
inputs:
azureSubscription: 'MYSUBSCRIPTION'
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az role assignment delete --ids "GUID1 GUID2 GUIDn"
name: CleanupRoleAssignments
And I’m getting this error:
ERROR: (MissingSubscription) The request did not have a subscription or a valid tenant level resource provider.
Code: MissingSubscription
Message: The request did not have a subscription or a valid tenant level resource provider.
I tried adding --scope
but that only got me an additional warning WARNING: option '--scope' will be ignored due to use of '--ids'
. The error persisted.
Any idea on what I’m doing wrong?
TIA
Jim