question

Ali-9593 avatar image
0 Votes"
Ali-9593 asked SadiqhAhmed-MSFT edited

Authorization error on adding postgres DB to backup vault data source

Backup vault is available to use in resource group despite error response on deployment.
ERROR ON Creating backup vault

 {
     "status": "Failed",
     "error": {
         "code": "AuthorizationFailed",
         "message": "The client '' with object id '' does not have authorization to perform action 'Microsoft.DataProtection/locations/operationStatus/read' over scope '/subscriptions/' or the scope is invalid. If access was recently granted, please refresh your credentials."
     }
 }


Error details on validating DB:

 The client '' with object id '' does not have authorization to perform action 'Microsoft.DataProtection/locations/operationStatus/read' over scope '/subscriptions/' or the scope is invalid. If access was recently granted, please refresh your credentials. {"x-ms-request-id":""}

Created the user azure_backup in DB and set as active directory admin, also gave the backup vault contributor permissions in Azure Database for PostgreSQL server and 'Allow Azure services' is activated in the firewall in the server instance. I created the prerequisite permissions for configure backup and restore mentioned in https://docs.microsoft.com/en-us/azure/backup/backup-azure-database-postgresql#prerequisite-permissions-for-configure-backup-and-restore

Any assistance in resolving this would be appreciated greatly.

azure-database-postgresql
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered

Hi @Ali-9593, welcome to Microsoft Q&A forum.

I was following the article mentioned by you and was able to successfully set up the backup.

Basically we need to setup:
1. Azure AD Admin for Postgre
2. Enable 'Allow access to Azure Service'
3. Set up the Access control for Reader role for Backup vault we just created
4. Setting permission for backup user by following the document mentioned in the same article.

However looking at the error message it seems the mentioned resource is not registered with the subscription. Could you please go through the below article which explains how to solve the same error:

Common problem when using Azure resource groups & RBAC

Please let me know if this helps.


If answer helps, please mark it 'Accept Answer'




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.