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 / Custom connector to ca...
Power Apps
Unanswered

Custom connector to call "/_api/web/getfilebyserverrelativeurl" will return this error ""Cannot deserialize data for type Microsoft.SharePoint.SPResourcePath.""

(0) ShareShare
ReportReport
Posted on by 3,514

I am creating a custom connector named "GetAttachments" to get the SharePoint list items metadata (Mainly created by and created), by passing the item serverrelativeurl,as follow:-

 

- This is the custom connector action named Info

 

johnjohn123_0-1663603606260.png

 

- this is the Test Operation page:-

 

johnjohn123_0-1663605367198.png

 

 

 

the final url will be something as follow:-

 

 

https://******.sharepoint.com/_api/web/getfilebyserverrelativeurl('/Lists/testattacments/Attachments/101/SW Software description.pdf')?$expand=Author&$select=Author/LoginName,Author/Email,Author/Id

 

 

but the above test inside the custom connector will return this error:-

 

 

{
"odata.error": {
"code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
"message": {
"lang": "en-US",
"value": "Cannot deserialize data for type Microsoft.SharePoint.SPResourcePath."
}
}
}

 

 

 

now if i directly call the api url from the browser i will get the related response correctly as follow:-

 

johnjohn123_1-1663605526250.png

 

also when i try to call the custom connector from Power Apps canvas app, i will get this error "resource not found":-

 

johnjohn123_3-1663604009980.png

 

 

 

although the file exists and i can make the call using the browser.. any advice?

 

Categories:
I have the same question (0)

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
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard