Pulling Azure Backup Data into Power BI

Ryley Proffitt-Johnson 0 Reputation points
2023-02-23T10:59:18.7966667+00:00

I am trying to pull my backup data from Azure Backup into Power BI report, to send out to clients. I have managed to get a table that lists the vault, however I am using the following query and getting an error when trying to get the backup data.

I have replaced the actual subscription ID and resource group in the error and query for privacy, but in my query these are as they should be with the correct values!

Any help would be appreciated!

Error:

DataSource.Error: Web.Contents failed to get contents from 'https://management.azure.com/subscriptions/<subscription-ID./resourceGroups/<RG>/providers/Microsoft.RecoveryServices/vaults/WHFS-Vault/backupItems?api-version=2021-02-01' (404): Not Found
Details:
    DataSourceKind=Web
    DataSourcePath=https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<RG>/providers/Microsoft.RecoveryServices/vaults/<Vault>/backupItems
    Url=https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<RG>/providers/Microsoft.RecoveryServices/vaults/<Vault>/backupItems?api-version=2021-02-01

Query:

let
    Token = GetAzureAccessToken(){0}[Column1],
    Source = Web.Contents("https://management.azure.com", [
        RelativePath = "/subscriptions/<subscription-id>/resourceGroups/<RG>/providers/Microsoft.RecoveryServices/vaults/" & [value.name] & "/backupItems?api-version=2021-02-01",
        Headers=[Accept="application/json"]
    ]),
    #"Converted to Table" = Json.Document(Source),
    #"Expanded Value" = Table.ExpandTableColumn(#"Converted to Table", "value", {"name", "properties"}, {"name", "properties"}),
    #"Expanded Properties" = Table.ExpandRecordColumn(#"Expanded Value", "properties", {"backupManagementType", "workloadType", "policyId", "lastBackupStatus", "backupType", "backupStatus", "healthStatus", "retentionPeriodInDays", "lastBackupTime"}, {"backupManagementType", "workloadType", "policyId", "lastBackupStatus", "backupType", "backupStatus", "healthStatus", "retentionPeriodInDays", "lastBackupTime"}),
    #"Filtered Rows" = Table.SelectRows(#"Expanded Properties", each ([lastBackupStatus] <> null))
in
    #"Filtered Rows"
Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,246 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 44,506 Reputation points Microsoft Employee
    2023-03-21T09:36:00.9633333+00:00

    Hi @Ryley Proffitt-Johnson Thank you for posting your question on Microsoft Q&A platform. Happy to assist!

    From details provided in the original post, it seems you are trying to pull backup data from Azure Backup into Power BI report and it is errorring out. I think the API you would need to call is - https://learn.microsoft.com/rest/api/backup/backup-protected-items/list?source=recommendations&tabs=HTTP (backupProtectedItems and not backupItems)

    Hope this helps!


    If the response helped, do "Accept Answer" and up-vote it

    0 comments No comments

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.