Hello Dave Leafa
Welcome to Microsoft Q&A Platform, thanks for posting your query here.
Based on the error message you provided, looks like the service principal you are using does not have the required permissions to perform the action 'Microsoft.Authorization/roleAssignments/write' over the specified scope '/subscriptions/xxxxxxxxxxxx/resourcegroups/RG-XXX-DEV/providers/Microsoft.Authorization/roleAssignments/xxxxxxxxxxxx'.
To resolve this issue, you can try the following steps:
- Ensure that the service principal has the 'Owner' or 'User Access Administrator' role assigned to it at the subscription level.
If the service principal already has the required role assigned, try refreshing the credentials for the service principal.
- If the issue persists, you can try granting the 'Microsoft.Authorization/roleAssignments/write' permission to the service principal at the subscription level.
I hope this helps!