web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Problem with using cre...
Power Automate
Answered

Problem with using createUploadSession in Microsoft Graph API

(0) ShareShare
ReportReport
Posted on by 102
I have a file (data.JSON) that I am uploading to Sharepoint every night. It has grown over 90MB and I am told I need to use createUploadSession to chunk it up. 
 
After a LOT of ridiculous pain in finding the correct formulation of site IDs and Item IDs, I have this URI which works in Graph Explorer. 
 
 
However, in Power Automate using the normal HTTP action, I always get a non-specific, non-informative error. 

 
{
    "statusCode"401,
    "headers": {
        "Date""Tue, 07 Apr 2026 10:47:26 GMT",
        "Cache-Control""private",
        "Transfer-Encoding""chunked",
        "Vary""Accept-Encoding",
        "WWW-Authenticate""Bearer realm=\"\", authorization_uri=\"https://login.microsoftonline.com/common/oauth2/authorize\", client_id=\"00000003-0000-0000-c000-000000000000\"",
        "Strict-Transport-Security""max-age=31536000; includeSubDomains",
        "x-ms-islandgateway""_prdil101enogb0_5",
        "x-ms-igw-tracking-id""522f9417-1104-41ab-a37f-1f01b158806a20260407104726_prdil101enogb0_5",
        "mise-correlation-id""2fa75e05-4fb0-46d5-81e1-23c64c7ba252",
        "Request-Id""8a438d23-5699-4b32-850d-620fcfd6818a",
        "client-request-id""8a438d23-5699-4b32-850d-620fcfd6818a",
        "x-ms-ags-diagnostic""{\"ServerInfo\":{\"DataCenter\":\"Norway East\",\"Slice\":\"E\",\"Ring\":\"2\",\"ScaleUnit\":\"002\",\"RoleInstance\":\"OS2PEPF00000604\"}}",
        "splogid""ab9b07a2-a0fe-e000-551e-f69330df88d9",
        "sprequestduration""10",
        "Server-Timing""x-ms-igw-upstream-headers;dur=51.5,x-ms-igw-req-overhead;dur=0.5",
        "X-Content-Type-Options""nosniff",
        "x-ms-service-request-id""522f9417-1104-41ab-a37f-1f01b158806a",
        "x-ms-correlation-id""7a1b6788-9ed0-46c0-8973-dc1e9b6ea47d",
        "x-ms-activity-vector""00.00.IN.0I.00",
        "Content-Type""application/json",
        "Content-Length""239"
    },
    "body": {
        "error": {
            "code""generalException",
            "message""General exception while processing",
            "innerError": {
                "date""2026-04-07T10:47:26",
                "request-id""8a438d23-5699-4b32-850d-620fcfd6818a",
                "client-request-id""8a438d23-5699-4b32-850d-620fcfd6818a"
            }
        }
    }
}
Categories:
I have the same question (0)
  • 11manish Profile Picture
    1,204 on at
    The 401 Unauthorized error when calling Microsoft Graph from Microsoft Power Automate is due to missing or incorrect authentication.
     
    Reason:
    • Graph Explorer works because it automatically provides a valid token
    • Power Automate’s standard HTTP action does not include a token by default
    Fix
    • Use HTTP with Microsoft Entra ID instead of normal HTTP
    • Set resource to https://graph.microsoft.com
    • Ensure permissions like Sites.ReadWrite.All are granted
  • AndreasO Profile Picture
    102 on at
    As you can see, the screenshot includes a token. Using HTTP with Microsoft Entra ID does not make a difference. The token is created by calling an application that has both Sites.ReadWrite.All and Files.ReadWrite.All per the documentation. 
  • Verified answer
    AndreasO Profile Picture
    102 on at
    This ended up being a problem with the Scopes being set as Delegated instead of Application scopes.
  • Vish WR Profile Picture
    644 on at
     
    I wonder whether it's an application or a delegation type; regardless, it will not work without a token.
     
    As mentioned by @11manish you need to use an HTTP call to get the token and then call the second API by passing the bearer token from the first call.
     
     I have a few flows using this same method. When I tried a direct call, I got an error in getting the token. All my app registrations are application type.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard