Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
I define MSAL config to get the access_token with custom scopes and make the API calls through the Azure API Management portal
I want to migrate this app to the Azure Static App's build in authentication and authorization with the following IdPs
Azure AD
Azure B2C
Github
I was reading the authentication and authorization documentation and found that this is supported out-of-the box with Azure Paid Tiers
However its not clear for me the following:
How would an exiting Blazor Webassembly migrate its authentication paths to use the /.auth/login/aad, /.auth/login/ab2c, /.auth/login/github routes
With the new .auth/login/*** routes how do I specify additional scopes and get the access_token
How do I use the access_token to call the protected web APIs that are hosted on Azure API Management or any other external protected API that authorizes with the access_token received from the IdP
Expected behavior
A clear and concise description on how to call protected API (Azure Functions, Azure API Management, External API) with access_token and custom scopes.
Visual Studio 2022
Blazor Standalone Webassembly
Azure Static Web APP
Azure API Management
Describe the bug
I have a Standalone Blazor Webassembly that is authenticated with MSAL using the standard
authentication/login
andauthentication\logout
pathsIt is deployed on the Azure Static Web Apps free tier right now.
I define MSAL config to get the
access_token
with custom scopes and make the API calls through the Azure API Management portalI want to migrate this app to the Azure Static App's build in authentication and authorization with the following IdPs
I was reading the authentication and authorization documentation and found that this is supported out-of-the box with Azure Paid Tiers
However its not clear for me the following:
/.auth/login/aad
,/.auth/login/ab2c
,/.auth/login/github
routes.auth/login/***
routes how do I specify additional scopes and get theaccess_token
access_token
to call the protected web APIs that are hosted on Azure API Management or any other external protected API that authorizes with theaccess_token
received from the IdPExpected behavior A clear and concise description on how to call protected API (Azure Functions, Azure API Management, External API) with access_token and custom scopes.
Visual Studio 2022 Blazor Standalone Webassembly Azure Static Web APP Azure API Management