cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shibu
Level: Powered On

Custom connector for Sharepoint REST API

As mentioned in the azure document for app registration, I was able to create connector for sharepoint rest api.

 

I tested the custom connector in powerapps for the rest api URL /sites/{sitename}/_api/web/getuserbyid({userid})/groups and I got all the sharepoint groups associated with the user and the response in JSON format.

 

When I tried to use the connector in powerapps and after passing all the required parameter.(sitename and userid). The output that is returned is always in xml and powerapps is not able to parse xml.

I did mention in the swagger file to produce and consume json. In the network console I could see they are using proxy url as shown below and response always shows xml 

 

image.pngNetwork consoleimage.pngSwagger description

 

https://msmanaged-na.azure-apim.net/apim/spapi.5f79410ce145b.5f7edfa0cdba0c396b/399ed19282a847568e50...

 

How do I get the JSON format as a response ?  This solution would help  me to maintain user roles in sharepoint site 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Custom connector for Sharepoint REST API

Could you please share the documentation for how to register App for SharePoint REST API?

 

Are you using Azure functions?

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Shibu
Level: Powered On

Re: Custom connector for Sharepoint REST API

I used the below blog article link for registering application for sharepoint rest api. Please refer the below link 

 

https://powerapps.microsoft.com/en-us/blog/implementing-role-based-permission/

RussellGove
Level 10

Re: Custom connector for Sharepoint REST API

Did you try adding and Accept  header?

Accept: application/json

 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,950)