Also having issues assigning azure built in roles ...
# azure
l
Also having issues assigning azure built in roles to a user assigned identity, I am getting
Copy code
Bad Request - Invalid URL
Copy code
acr_pull_role_assignment = azure_native.authorization.RoleAssignment("acrPull",
    principal_id=user_assigned_identity.client_id,
    principal_type="User",
    role_assignment_name="AcrPull",
    scope=f"/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/{utic_hosted_api_rg.name}/providers/Microsoft.ContainerRegistry/registries/protogenus",
    role_definition_id=f"/subscriptions/{SUBSCRIPTION_ID}/providers/Microsoft.Authorization/roleDefinitions/AcrPull")
I also tried it with the roles id like
Copy code
f"/subscriptions/{SUBSCRIPTION_ID}/providers/Microsoft.Authorization/roleDefinitions/7f951dda-4ed3-4680-a7ca-43fe172d538d")
b
roleDefinitions/7f951dda-4ed3-4680-a7ca-43fe172d538d
this one is correct. it should be id
l
ok will try that, thanks!
b
check the scope