Skip to main content

Notifications

Power Automate - Using Connectors
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

  • Verified answer
    FD-19081541-0 Profile Picture
    FD-19081541-0 67 on at
    Re: Call Sharepoint API to get the Drives

    Thanks Expiscornovus

     

    It works fine now !

     

  • Verified answer
    Expiscornovus Profile Picture
    Expiscornovus 31,139 on at
    Re: Call Sharepoint API to get the Drives

    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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard

Featured topics