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 Apps / Power App upload file ...
Power Apps
Answered

Power App upload file to SP Doc Library using MS Office Graph Explorer (for 365 Groups Connector)

(0) ShareShare
ReportReport
Posted on by 126

Hi,

@EddieE 

Good day! I have a Power App where the user would attach file/files and we want to upload the attached file/ files to a Share Point Doc Library [not a SP List]. For that I found that some developers online suggesting using office 365 Groups Connector. For that first use Microsoft Graph Explorer-> to get the info for HTTP request file upload Graph API.

But I am having issue at the first step [using Graph Explorer to get the required ids for the SP Doc lib so that I can pass that info to the API endpoint]: When I run the GET query- I get the following error: "Invalid Hostname for this tenancy"

reveur007_1-1701385015272.png

- I checked I have signed in with my work/org account [even tried with my personal MS account & checked the "Consents" to see if that works, but also got error].

 

-For reference, this is the SP site and the Doc library.

reveur007_2-1701385256548.png

 

I would appreciate it a lot if you could suggest how to resolve this issue. Best, reveuroo7

 

Categories:
  • narayan225 Profile Picture
    2,547 Moderator on at

    @reveur007 

     

    Generally, a SharePoint library URL is something like {tenant}.sharepoint.com

     

    But your screenshot shows that it is not like that. I tried myself and it is working fine.

    narayan225_0-1701386964086.png

    I suggest you try and put the .sharepoint.com domain in the url and check.

     

    Hope this helps.

     

    Cheers!

  • Verified answer
    EddieE Profile Picture
    4,650 Moderator on at

    @reveur007 

    Not sure why you are using MS Graph for this, you can use Power Automate to do this - if you have a licence? This video by Chino Does Stuff walks you through a way to do this

     

    https://www.youtube.com/watch?v=yC0W5am6M3Q&t=1182s

     

    If you have to use MS Graph, then I'll leave you with @narayan225 as I don't have enough experience using it to be overly helpful.

  • reveur007 Profile Picture
    126 on at

    Hi @narayan225,

    The site [my org's where the Doc Lib is located] is

    https://eu001-sp.xyz.com/sites/SPO002625

    XYZ: my org name [I am changing to XYZ here in the post]

    So, I am using in the GET ->

    https://graph.microsoft.com/v1.0/sites/eu001-sp.XYZ.com:/sites/SPO002625

    The url looks it has sp [sharepoint] part then .XYZ.com- right? Am I missing something? 

    Many thanks in advance.

     

     

  • narayan225 Profile Picture
    2,547 Moderator on at

    @reveur007 

     

    I just realised from your screenshot. you are not logged into Graph Explorer. You are using the sample data from Microsoft under Sample tenant which is why it doesn't recognise the SharePoint url from your org.

     

    Please login with the same account as you are using in SharePoint, provide necessary permissions and try running the query again. It should work.

     

    Hope this helps.

    Cheers!

  • reveur007 Profile Picture
    126 on at

    Hi @narayan225:

    I checked that last week when I posted this query:

    I get this message though, 

    reveur007_0-1701713423777.png

     

  • narayan225 Profile Picture
    2,547 Moderator on at

    @reveur007 

     

    That means access to graph explorer is not enabled to you by your organization admin. Please contact them.

    This can be enabled by going to Entra admin center -> Enterprise applications -> Graph explorer and then enabling it for users to sign-in from Properties.

    narayan225_0-1701730856873.png

     

    Hope this helps.

    Cheers!

  • reveur007 Profile Picture
    126 on at

    Thanks @EddieE ,

    I have decided to use the Power Automate Flow, MS Graph Api can impose constraints to Business users uploading files from their own device! 🙂

  • reveur007 Profile Picture
    126 on at

    Hi @narayan225 -thanks a lot for your time. 

    I have decided to use the Power Automate Flow, MS Graph Api can impose constraints to Business users uploading files from their own device! 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard