cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerFred
Frequent Visitor

Call Sharepoint API to get the Drives

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

2 ACCEPTED SOLUTIONS

Accepted Solutions
Expiscornovus
Super User
Super User

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

View solution in original post

PowerFred
Frequent Visitor

Thanks Expiscornovus

 

It works fine now !

 

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

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

View solution in original post

PowerFred
Frequent Visitor

Thanks Expiscornovus

 

It works fine now !

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,426)