---
title: "Comment by Peter Wall on \"How to easily backup your Azure environment using EntraExporter and Azure DevOps Pipeline\" | Hashnode"
description: "Running this I get the an error. Could you please advise on how to best solve this? It works if I run the Export-command locally on a server towards the same En"
url: "https://hashnode.com/posts/how-to-easily-backup-your-azure-environment-using-entraexporter-and-azure-devops-pipeline/6516b6ad632586d66404b2f6/comment/660fbdb88743c678a5820b93"
---

[Discussion](https://hashnode.com/posts/how-to-easily-backup-your-azure-environment-using-entraexporter-and-azure-devops-pipeline/6516b6ad632586d66404b2f6)

Comment [How to easily backup your Azure environment using EntraExporter and Azure DevOps Pipeline](https://hashnode.com/posts/how-to-easily-backup-your-azure-environment-using-entraexporter-and-azure-devops-pipeline/6516b6ad632586d66404b2f6)

[Peter Wall](https://hashnode.com/@PeterW)

[Apr 5, 2024](https://hashnode.com/posts/how-to-easily-backup-your-azure-environment-using-entraexporter-and-azure-devops-pipeline/6516b6ad632586d66404b2f6/comment/660fbdb88743c678a5820b93)

Running this I get the an error. Could you please advise on how to best solve this? It works if I run the Export-command locally on a server towards the same Entra ID, but not through Azure Devops using your code. Thanks.

PrivilegedAccess/AzureResources/Resources

##\[error\]Export-Entra : GET XXXXgraph.microsoft.com/beta/privilegedAccess/azureResources/resources?$skiptoken=XXXXX HTTP/1.1 400 Bad Request Transfer-Encoding: chunked Vary: Accept-Encoding Strict-Transport-Security: max-age=31536000 request-id: XXXX client-request-id: XXXX x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"008","RoleInstance":"XXXX"}} Date: Fri, 05 Apr 2024 07:55:28 GMT Content-Encoding: gzip Content-Type: application/json {"error":{"code":"InvalidFilter","message":"The filter is invalid.","innerError":{"date":"2024-04-05T07:55:29","reques t-id":"XXX","client-request-id":"XXX"}}} At D:\\a\_temp\\32f8a8a7-ae2d-4a87-859d-eafcc7051148.ps1:37 char:1

-   Export-Entra "$root\\prod-backup" -All -CloudUsersAndGroupsOnly
-   \~~~~~~~~~~~~~~
    -   CategoryInfo : NotSpecified: (:) \[Write-Error\], WriteErrorException
    -   FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Export-Entra ##\[error\]PowerShell exited with code '1'.

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Apr 5, 2024](https://hashnode.com/posts/how-to-easily-backup-your-azure-environment-using-entraexporter-and-azure-devops-pipeline/6516b6ad632586d66404b2f6/comment/660fbdb88743c678a5820b93#reply-660fbf19b6d7237c80ba855c)

Are you sure you are using the same EntraExporter version as used in the pipeline? And account with exactly the same permissions? Anyway this seems to be related to the EntraExporter module more of the pipeline code. The problem seems to be in the called uri (filter part). But it's truncated in what you have sent. So hard to say

[Peter Wall](https://hashnode.com/@PeterW)

[Apr 5, 2024](https://hashnode.com/posts/how-to-easily-backup-your-azure-environment-using-entraexporter-and-azure-devops-pipeline/6516b6ad632586d66404b2f6/comment/660fbdb88743c678a5820b93#reply-660fc35850f03337b71278fb)

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf) The code I use in Azure Devops is copied this morning directly from your github, only alteration I have done to it is change the name of the service connection. Rest is identical. I thought first it might be the module, but I got it (the Export-module) working locally on my server towards the same Entra ID so not sure. Do you know how I can un-truncate the error message? The error is equally copied directly, only alteration I made was a few Xs.
