Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Answered

How to call external Api(custom api in dynamics 365) from power app portal(power pages).

(0) ShareShare
ReportReport
Posted on by

Hi everyone, I'm trying to call custom API which I created in solution from power pages. as I have followed Microsoft docs for creating site settings and created app registration in AAD as well still I'm not able to get chances of calling it. Can someone please guide me on how to call api from power pages.

Note: In some references they say to get auth token from portal by <portal_url>/_services/auth/token by pasting url in browser. But for me I never got the token from portal. Is there any configurations  

 

References: https://learn.microsoft.com/en-us/power-pages/security/oauth-implicit-grant-flow

 

Categories:
  • Community Power Platform Member Profile Picture
    on at
    Re: How to call external Api(custom api in dynamics 365) from power app portal(power pages).

    Thank you @KH_2437 

  • Verified answer
    Peragin Profile Picture
    160 on at
    Re: How to call external Api(custom api in dynamics 365) from power app portal(power pages).

    Hi @Anonymous ,

     

    Hopefully, this may help.

  • Community Power Platform Member Profile Picture
    on at
    Re: How to call external Api(custom api in dynamics 365) from power app portal(power pages).

    Thank you @KH_2437 that was so good information. I tired to to a post request using token url from browser console but I'm getting 404 not found error. But can you please shed some light on APIM? I'm bit curious about this. Because I'm bit new to these and I'm not sure how to validate token in APIM and JWT validate in inbound policies. How to do these things. This will help a lot

  • Peragin Profile Picture
    160 on at
    Re: How to call external Api(custom api in dynamics 365) from power app portal(power pages).

    Hi @Anonymous 

     

    I believe <portal_url>/_services/auth/token only support post now and the browser uses get. You will need to go into the console on the browser and call the post action from there.

     

    When it comes to authentication, using APIM to call your custom API, will allow you validate the power pages token in APIM using JWT validate in the inbound policies. Better to extract the username from the token with in the policy and pass it to your custom API for any authorizations you may need in the custom API.

     

    A question that's probably worth asking though, is it really necessary to use a custom api? You will need to use client side javascript to do so and this carries it's own concerns of where users can manipulate it at the browser. Power pages works best with the data is on dataverse, is it a possibility to copy the required data to there?

     

    Or wait for the new feature due for release to preview shortly where one can call a Power Automate flow that can then call your custom API from power pages. Not sure what the lag will be like on this but if it's fast, it will be very promising for simplifying the whole area. Use cloud flows with Power Pages sites 

     

    Regards

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

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43