Skip to main content

Notifications

Power Apps - Power Apps Governance and Administ...
Unanswered

access canvas app by passing bearer token in request header

(0) ShareShare
ReportReport
Posted on by 8
Hi,
 
we are developing a custom mobile app using React Native. For authentication we are using Azure B2C for user authentication (M365 default credential popup and MFA). After getting the token we are consuming Dataverse default REST APIs by passing the Bearer token in request header.
 
One of the requirements is that we need to open Canvas App from the same custom mobile app in the web-view but we don't want the user to get prompted for the credentials again. Is there any way which can be adopted and user can use the same token which we he has received initially and access the canvas app seamlessly (for example passing the Bearer token as request header or query string).
 
code snippet of webview
 
<WebViewsource={{uri: powerAppUrl,             headers: {               Authorization: `Bearer ${accessToken}`, }, }}/>
 
Thanks
Categories:
  • AM-09101446-0 Profile Picture
    AM-09101446-0 8 on at
    access canvas app by passing bearer token in request header
    Thanks SaiRT14 for the response. As per my knowledge Azure AD B2C authentication can be configured for Power Pages/Portal and not for Canvas apps. Kindly let me know if you can refer to any related article which can guide for the required configuration.

    OR if we can pass the token in query string which can be retrieved by Canvas app and can be used to validate user?
     
  • SaiRT14 Profile Picture
    SaiRT14 1,931 on at
    access canvas app by passing bearer token in request header
     
    Unfortunately, directly passing the Bearer token in the request header or query string is not supported for seamless authentication with Canvas Apps embedded in a web view.

    Enable Persistent Login in Azure B2C: Ensure that persistent sessions are enabled in Azure AD B2C so that the login session is retained and shared.

    Use the Same Login Domain: When opening the Canvas App in the web view, ensure it uses the same authentication context and domain as the token issued for the custom app.

    Configure Power Apps to Use Azure AD B2C: Set up the Canvas App with Azure AD B2C authentication in the Power Apps environment. Ensure the app's authentication redirects match the Azure AD B2C tenant.

    pls try and let me know if you need more details.

    thanks.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard

Featured topics