Authorization error on adding postgres DB to backup vault data source

Ali 21 Reputation points
2021-05-31T12:49:55.18+00:00

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://learn.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 for PostgreSQL
0 comments No comments
{count} votes

Accepted answer
  1. Anurag Sharma 17,626 Reputation points
    2021-06-03T10:03:39.5+00:00

    Hi @Ali , 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'

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.