Azure v2 API - How to Download file from Azure blob.core.windows.net using https or postman

DavidK 25 Reputation points
2025-04-01T20:38:05.0466667+00:00

Hi. I can't seem to download file from Azure blob using http or postman after accessing the data

Here's what I receive after running a GET on "https://graph.microsoft.com/v1.0/reports/partners/billing/operations/exxxxxxxxxxxx"

If I try to access the rootdirectory link through a browser I get "Public access is not permitted on this storage account" and I don't see a lot of documentation online on how to grab this data or what parameters are needed if running through something like a browser, postman or curl even.

Thanks so much for your help!

{

"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#reports/partners/billing/operations/$entity",

"@odata.type": "#microsoft.graph.partners.billing.exportSuccessOperation",

"id": "e492xxxxxxx",

"createdDateTime": "2025-04-01T20:16:54Z",

"lastActionDateTime": "2025-04-01T20:17:32.0957441Z",

"status": "succeeded",

"resourceLocation": {

    "id": "7beexxxxxxxxxx",

    "createdDateTime": "2025-03-07T12:43:40.576Z",

    "schemaVersion": "2",

    "dataFormat": "compressedJSON",

    "partitionType": "default",

    "eTag": "JTtSxxxxxxxxxx",

    "partnerTenantId": "axxxxxxxxxxxxxx1",

    "rootDirectory": "https://adlsreconbuprodeastus201.blob.core.windows.net/billedusagefastpath/v1/PartnerTenantId=axxxxxxxxxxx1/BillingMonth=2025xx/InvoiceId=Gxxxxxxxxx/InvoiceVersion=202503071210/Fragment=full/PartitionType=default",

    "sasToken": "skoid=5xxxxx&sktid=9xxxxx&skt=2025-04-01T20%3xx%3A3xx&ske=2025-04-02T20%3xx%3Axx&sks=b&skv=2021-08-06&sv=2021-08-06&se=2025-04-02T00%3A17%3Axxx&sr=d&sp=rl&sdd=7&sig=wHW0CnY2tH0egLpPRhVq9wcj2164MKHSUvzCW5DDyJQ%3D",

    "blobCount": 1,

    "blobs": [

        {

            "name": "part-xxxx.json.gz",

            "partitionValue": "default"

        }

    ]

}

}

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,529 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nandamuri Pranay Teja 3,610 Reputation points Microsoft External Staff Moderator
    2025-04-02T06:14:31.9833333+00:00

    Hello DavidK

    I understand that your unable to access data from your Azure Blob Storage, as you're encountering authentication errors. You have a rootDirectory and a sasToken. You need to combine these with the blob name to form the correct URL for downloading.

    Example:

    rootDirectory: https://adlsreconbuprodeastus201.blob.core.windows.net/billedusagefastpath/v1/PartnerTenantId=axxxxxxxxxxx1/BillingMonth=2025xx/InvoiceId=Gxxxxxxxxx/InvoiceVersion=202503071210/Fragment=full/PartitionType=default

    sasToken:

    skoid=5xxxxx&sktid=9xxxxx&skt=2025-04-01T20%3xx%3A3xx&ske=2025-04-02T20%3xx%3Axx&sks=b&skv=2021-08-06&sv=2021-08-06&se=2025-04-02T00%3A17%3Axxx&sr=d&sp=rl&sdd=7&sig=wHW0CnY2tH0egLpPRhVq9wcj2164MKHSUvzCW5DDyJQ%3D
    

    blob name

    part-xxxx.json.gz To create the full URL, you'll append the blob name to the rootDirectory, and then append the sasToken
    

    It should look like this:

    https://adlsreconbuprodeastus201.blob.core.windows.net/billedusagefastpath/v1/PartnerTenantId=axxxxxxxxxxx1/BillingMonth=2025xx/InvoiceId=Gxxxxxxxxx/InvoiceVersion=202503071210/Fragment=full/PartitionType=default/part-xxxx.json.gz?skoid=5xxxxx&sktid=9xxxxx&skt=2025-04-01T20%3xx%3A3xx&ske=2025-04-02T20%3xx%3Axx&sks=b&skv=2021-08-06&sv=2021-08-06&se=2025-04-02T00%3A17%3Axxx&sr=d&sp=rl&sdd=7&sig=wHW0CnY2tH0egLpPRhVq9wcj2164MKHSUvzCW5DDyJQ%3D

    Now that you have the complete URL, you can use any HTTP client to download the file. Post which create a GET request in Postman. Enter the full URL (including the SAS token) in the URL field and send the request. If the request is successful (status code 200), you'll be able to save the file from the response.

    Curl:

    curl -o downloaded_file.json.gz "https://adlsreconbuprodeastus201.blob.core.windows.net/billedusagefastpath/v1/PartnerTenantId=axxxxxxxxxxx1/BillingMonth=2025xx/InvoiceId=Gxxxxxxxxx/InvoiceVersion=202503071210/Fragment=full/PartitionType=default/part-xxxx.json.gz?skoid=5xxxxx&sktid=9xxxxx&skt=2025-04-01T20%3xx%3A3xx&ske=2025-04-02T20%3xx%3Axx&sks=b&skv=2021-08-06&sv=2021-08-06&se=2025-04-02T00%3A17%3Axxx&sr=d&sp=rl&sdd=7&sig=wHW0CnY2tH0egLpPRhVq9wcj2164MKHSUvzCW5DDyJQ%3D" -v
    

    Hope the above answer helps! Please let us know do you have any further queries.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members. 

    1 person found this answer helpful.

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.