web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Unanswered

Host React App in Power Pages with B2C Auth and Call Azure Function for SharePoint Access.

(1) ShareShare
ReportReport
Posted on by

Hi Community,

 

I’m working on a solution that involves embedding a React app within a Power Pages site that uses Azure AD B2C authentication. The end goal is to allow the React app to interact with SharePoint data via an Azure Function, using managed identity for secure backend access.

 

Here’s the intended flow:

 
  1. User signs in to the Power Pages site using Azure AD B2C.

  2. A custom React app, hosted within the Power Pages site (possibly via iframe or another embedding method), needs to access the user’s authentication token.

  3. The React app sends this token to an Azure Function (HTTP triggered).

  4. The Azure Function validates the token, then uses its managed identity to securely access SharePoint (via Microsoft Graph or SharePoint REST API).

 

I’m looking for guidance or best practices on the following:

 
  • How can I access the Azure AD B2C token from within the embedded React app on Power Pages?

  • What is the best way to securely pass the token to the Azure Function?

  • How should the Azure Function validate the token before proceeding with SharePoint access?

  • Are there any specific CORS, identity provider, or authorization policies I should configure to make this work securely and smoothly?

If anyone has experience or references for a setup involving Power Pages + React + Azure AD B2C + Azure Functions + SharePoint via managed identity, your insights would be incredibly helpful!

 

Thanks in advance for your support.

Categories:
I have the same question (0)
  • Lucas001 Profile Picture
    2,334 Super User 2025 Season 2 on at
    Host React App in Power Pages with B2C Auth and Call Azure Function for SharePoint Access.
     
    without being able to solve your issue, it seems you have some coding background.
    If you already host your ReactApp, is there any reason why not self hosting the app and in case it's needed using the Dataverse WebApi for further actions?

    The way you are designing the app will take some time and maintenance is going to be a big topic to talk about. 
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 85 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 54

#3
dgray304 Profile Picture

dgray304 39

Last 30 days Overall leaderboard