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 / How to call external A...
Power Pages
Unanswered

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:
I have the same question (0)
  • Peragin Profile Picture
    160 on at

    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

  • Community Power Platform Member Profile Picture
    on at

    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

  • Verified answer
    Peragin Profile Picture
    160 on at

    Hi @Anonymous ,

     

    Hopefully, this may help.

  • Community Power Platform Member Profile Picture
    on at

    Thank you @KH_2437 

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
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard