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 / Copilot Studio / Copilot Agent with Sha...
Copilot Studio
Unanswered

Copilot Agent with Sharepoint HTTP REST api tool.

(0) ShareShare
ReportReport
Posted on by
I am having trouble trying to configure a bot for our sharepoint site. I have created the bot, explained to it the structure of the site, given we use document sets and content types, i have explained those as well  and given it the content type IDs. Since it does not seem able to access metadata by default, I have added a tool for the "Send an HTTP request to Sharepoint". This is something I have used a lot in logic apps since we can't use the standard actions and it works fine there, even if its a little sparse on error feedback.
 
The problem is, once I configure the tool for the agent, I can ask it if it now has access to read the metadata and it replies yes. When I ask it something straight forward like, count the amount of items, I get the following error:
 
Error Message: Evaluating PowerFx expression resulted in error while invoking the connector : PVA.HttpRequest failed: JsonReaderException '0x1F' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0. Error Code: ConnectorPowerFxError

I have been troubleshooting this for quite a while. I have tired custom hard set values of the URI, the Method, the headers and its 12 different ways of taking the same JSON string for the header, with and without brackets, on the same line or not on the same line. Everything I try error  causes it to complain its missing JSON when its not, or sends me straight back to the 0x1F error.
 
Obviously something between these processes is failing, the agent or tool can't understand the response and complains about this invisible character.
 
Has anyone else come across this or knows how I can get this to work properly? 
 
I have the same question (0)
  • Sam_Fawzi Profile Picture
    759 Super User 2025 Season 2 on at
     
    Try to set headers explicitly like this in your "Send an HTTP request to SharePoint" :
     
    {
      "Accept": "application/json;odata=nometadata",
      "Content-Type": "application/json;odata=nometadata",
      "Accept-Encoding": "identity"
    }

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 > Copilot Studio

#1
Valantis Profile Picture

Valantis 430

#2
chiaraalina Profile Picture

chiaraalina 130

#3
S-Venkadesh Profile Picture

S-Venkadesh 68 Moderator

Last 30 days Overall leaderboard