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 / Power Pages / REST API Integration w...
Power Pages
Unanswered

REST API Integration with Power Pages

(0) ShareShare
ReportReport
Posted on by
We have Developed an app using Power Pages. Front End Development is done on Power Pages. Functionalities are built using HTML, Java Script, jQuery  and Cascading Style Sheets (CSS). Now we need to Integrate these two and we are unable to do it.

Using Python Django we have created Rest API.  Now we want connect Power Pages with Rest API and it is throwing an error. Below Are the details of Error.
 
Access to fetch at rest API from origin power pages has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cores' to fetch the resource with CORS disabled.
Categories:
I have the same question (0)
  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @Bharathhm 

     

    Welcome to the Power Pages forum.  I am not sure whether you have explored Portals web API. Official docs here 

    you can build most of the functionalities without writing your own data using API.  

     

    Power Pages is tightly coupled with Dataverse.  You can achieve many things using the OOB functionality. 

     

    Enough of my lecture,

    You have few options here to fix the issue 

    1. You can do simple Ajax calls

    2. You can try fetch call. Check this blog 

    3. Use Power Automate and HTTP trigger and return the value to Power Pages.  Official URL 

    Assuming you are doing Ajax call, then the next step is to "enable implicit grant flow" to avoid the CORS issue 

    Official URL here:

     

    @OliverRodrigues & @OOlashyn  - anything I am missing here? 

     

    Hope it helps.
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

     

     

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    I totally agree with @ragavanrajan - if you can go with Web API to send data from Power Pages to Dataverse. However, if external integration is needed you can avoid CORS issues by configuring your Django server to accept requests from Power Pages by adding the Power Pages URL as the allowed origin. Similarly you can configure CORS on Power Pages side - see official docs here https://learn.microsoft.com/mt-mt/power-pages/configure/cors-support

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 > Power Pages

#1
Fubar Profile Picture

Fubar 78 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard