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 Pages / Web API usage on publi...
Power Pages
Unanswered

Web API usage on public pages

(0) ShareShare
ReportReport
Posted on by 66

Hi,

 

I want to know if we can use Web API to perform read/create/update for public facing pages. These pages are open to anyone without having someone assigned anonymous web role? if yes, then please share any sample.

 

Will this result in any kind data leaks if possible malicious user can somehow use web api to perform different operation on table records?

 

Thanks

Categories:
I have the same question (0)
  • Christian Leverenz Profile Picture
    1,214 on at

    Hi jeffgreenrc,

    we use the webapi in portals also for anonymous access. The problem you are adressing is not a problem of the web api. There could also be misuse on forms which are anonymously accessible.

     

    The create/update/delete has to be set by the settings as described in the documentation ( https://docs.microsoft.com/en-us/powerapps/maker/portals/web-api-overview , make sure to read https://docs.microsoft.com/en-us/powerapps/maker/portals/web-api-http-requests-handle-errors , this will prevent a lot of headaches 🙂 ) .

    Additionally you have to set the proper accessrights in entitypermissions and assign those entitypermissions to a webrole which is associated with anonymous access.

     

    There is currently no read in the api as far as i know. Usually we write a liquid which issues a fetchxml and we render the response as json ( akin to https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/render-rss-custom-page-template but json instead of xml) . This could then either be put to the form as static json or it could be used as a kind of backendservice which is callable as if it was a page.

    In my opinion the webapi is a little bit more secure than the formsubmission as the fomsubmissions submits every field which was customized on the form. As this customzation is in large companies done by diffrent people than those, who run the portal, there might be accidentially fields on forms which should not be public accessible.

     

    If you use the webapi, you should only enable those fields, which you want to make accessible in that service.

     

    I do not know of any securityissiues like injections or whatever to 'hijack' that service. It' the other way round: if you do not enabel the right things it will not work. And we have to configure a lot...

     

    Hope this helps a little bit and points you to the right direction.

    Have fun,

      Christian

     

  • Fubar Profile Picture
    8,463 Super User 2026 Season 1 on at

    Just be aware that as it would be public that any data you serve should not be private.

     

    Permissions to entities etc would just come from the Web Role that was set for anonymous users.  But as the user is not authenticated you cannot restrict to Contact and Account associations to the records, and so someone can open browsers developer mode (F12) and make a query from the console and get a result back (so you only want the data that is exposed to be public anyway - so it doesn't matter if they hack your page)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 45

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 14 Most Valuable Professional

#3
DP_Prabh Profile Picture

DP_Prabh 13

Last 30 days Overall leaderboard