You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to follow the youtube series,
I can this error when running CreateDevopsSP.ps1 in Azure Cloud Shell
ERROR: Usage error: To create role assignments, specify both --role and --scopes.
Select a region to deploy to by number: 10
Selecting region 10. uksouth
PS /home/alex>
PS /home/alex> #adjust the vars to your needs!
PS /home/alex> $SPName = 'myDevopsSP' #your value here!
PS /home/alex> $keyvaultnamePrefix = 'kv-avdPoc' #leave this as is - (otherwhise you would need to change this in the pipeline variable file consistently)
PS /home/alex> $rgForSharedResources = 'rg-avdPoC-shared' #leave this as is - (otherwhise you would need to change this in the pipeline variable file consistently)
PS /home/alex>
PS /home/alex>
PS /home/alex> # create Service Principal (it needs to be owner to set permissions on azure artefacts - especially the application group users)
PS /home/alex> $sp = az ad sp create-for-rbac -n "$SPName" --role 'owner'
ERROR: Usage error: To create role assignments, specify both --role and --scopes.
PS /home/alex>
PS /home/alex> # this role is needed for the service principal to upload files to an azure storage account using azure devops.
PS /home/alex> az role assignment create --assignee "$($($sp | ConvertFrom-Json).appId)" --role 'Storage Blob Data Contributor'
argument --assignee: expected one argument
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to follow the youtube series,
I can this error when running CreateDevopsSP.ps1 in Azure Cloud Shell
ERROR: Usage error: To create role assignments, specify both --role and --scopes.
Select a region to deploy to by number: 10
Selecting region 10. uksouth
PS /home/alex>
PS /home/alex> #adjust the vars to your needs!
PS /home/alex> $SPName = 'myDevopsSP' #your value here!
PS /home/alex> $keyvaultnamePrefix = 'kv-avdPoc' #leave this as is - (otherwhise you would need to change this in the pipeline variable file consistently)
PS /home/alex> $rgForSharedResources = 'rg-avdPoC-shared' #leave this as is - (otherwhise you would need to change this in the pipeline variable file consistently)
PS /home/alex>
PS /home/alex>
PS /home/alex> # create Service Principal (it needs to be owner to set permissions on azure artefacts - especially the application group users)
PS /home/alex> $sp = az ad sp create-for-rbac -n "$SPName" --role 'owner'
ERROR: Usage error: To create role assignments, specify both --role and --scopes.
PS /home/alex>
PS /home/alex> # this role is needed for the service principal to upload files to an azure storage account using azure devops.
PS /home/alex> az role assignment create --assignee "$($($sp | ConvertFrom-Json).appId)" --role 'Storage Blob Data Contributor'
argument --assignee: expected one argument
The text was updated successfully, but these errors were encountered: