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 for S...
Power Apps
Suggested Answer

Custom connector for Sharepoint REST API

(1) ShareShare
ReportReport
Posted on by 28

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 

 

Network consoleNetwork consoleSwagger descriptionSwagger description

 

https://msmanaged-na.azure-apim.net/apim/spapi.5f79410ce145b.5f7edfa0cdba0c396b/399ed19282a847568e504a8e8ca0/sites/SharepointSandbox/_api/web/getuserbyid%2813%29/groups

 

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

Categories:
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

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

     

    Are you using Azure functions?

     

    Regards,

    Michael

  • Shibu Profile Picture
    28 on at

    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/

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Did you try adding and Accept  header?

    Accept: application/json

     

  • Suggested answer
    rohitsbots Profile Picture
    280 on at
    Can you call this custom connector using Power Automate? You can add an action on power automate to convert the XML result to JSON response by using this formula json(xml(body('HTTP'))). Then you can parse JSON in Powerapp.
     
    In my case I'm using HTTP action that returns xml response and then you convert the xml to json.
     

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard