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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Call Sharepoint API to...
Power Automate
Answered

Call Sharepoint API to get the Drives

(0) ShareShare
ReportReport
Posted on by 67

Hi all,

 

I need to get the ID of a drive (library) of my SPO site.

 

I saw that there are new API to are expected to provide it.

 

I called it first directly from the browser 

 

https://xxxxxx.sharepoint.com/sites/xxx/_api/v2.0/drives

 

And it returned what I was expected

 

Now trying it with the SPO connector "Send an HTTP request to SharePoint", I got the error "Unexpected response from the service"

PowerFred_0-1629797876790.png

 

I get the same issue calling for _api/v2.0/lists

 

But it works calling _api/web/lists and _api/web/drives is not found

 

Can anyone tell me how to fix the issue?

 

Thanks in advance

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,396 Most Valuable Professional on at

    Hi @PowerFred,

     

    Can you add some headers to the GET request? Let me know if that works for you.

     

    {
     "Content-Type": "application/json",
     "Accept": "application/json"
    }

     

    addsomeheader.png

  • Verified answer
    FD-19081541-0 Profile Picture
    67 on at

    Thanks Expiscornovus

     

    It works fine now !

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 223 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 205 Most Valuable Professional

#3
harshdeol Profile Picture

harshdeol 167 Moderator

Last 30 days Overall leaderboard