Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
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:
  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at
    Re: REST API Integration with Power Pages

    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

  • ragavanrajan Profile Picture
    7,036 Most Valuable Professional on at
    Re: REST API Integration with Power Pages

    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.

     

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >