Questions tagged msal-angular

Explore the latest questions and answers asked by our top developers.

BrowserAuthError: interaction_in_progress – Unable to fix, regardles of solutions found

I’m implementing security for the applications at the company I’m working at right now. I’m using @azure/[email protected], @azure/[email protected] I followed the example found here and got it working for the first application. I went on to implement it for the next application, which is basically the same one, just talks to a different api, but […]

By Aiko Beyers
Published
Categorized as angular, azure, javascript, msal, msal-angular Tagged , , , ,

msal dynamic load config in angular

I want to use msal to login and get token. For some reason, I have to dynamic load config parameters to msal request. Unfortunately https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-angular-auth-code is not able to do dynamic configuration. The clientId is hardcoded. But I want to change it by environment. This one and #481 issue are for msal 1.x. In msal […]

By Bigeyes
Published
Categorized as angular, angular11, msal, msal-angular Tagged , , ,

angular msal v2 missing group claims

I’m looking to upgrade my angular app from MSAL v1 to MSAL v2, and one problem I have is the jwt token that the guard adds to requests does not include the group field in the payload anymore. We use group membership to decide who can access what so this is a big blocker of […]

By Kevin
Published
Categorized as angular, msal-angular Tagged ,

How to pass clientId in different environment to AppModule

I use msal to do authentication. In my AppModule.ts (from the example) @NgModule({ declarations: [ AppComponent, HomeComponent, ProfileComponent ], imports: [ BrowserModule, AppRoutingModule, MsalModule.forRoot( new PublicClientApplication({ auth: { clientId: ‘Enter_the_Application_Id_here’, // This is your client ID authority: ‘Enter_the_Cloud_Instance_Id_Here’/’Enter_the_Tenant_Info_Here’, // This is your tenant ID redirectUri: ‘Enter_the_Redirect_Uri_Here’// This is your redirect URI }, cache: { cacheLocation: […]

By Hello
Published
Categorized as angular, angular11, msal, msal-angular Tagged , , ,

Best way to handle msal redirect errors from the Msal2Provider in an angular project?

i am using the @microsoft/mgt libraries in order to use the Msal2Provider, people picker, and teams channel picker features. Everything is going great but I would like for our app to not crash if there ever is an error signing in to microsoft to retrieve the MSAL token using: Providers.globalProvider = new Msal2Provider({ clientId: ‘my-client-id’, […]

How to configure msal-angular interceptor to send an access token (v2) to own domain (self)

I updated to @azure/msal-angular v2 from v1. And I cannot figure out how to configure it to send an access token to my backend hosted on the same domain. So when my frontend makes a request to /api/foo then the MsalInterceptor should attach my access token in the version 2 format – not version 1. […]

MSAL Angular MsalGuard configuring logout

I am doing a POC on MSAL implementation on our Angular app. Requirements: The user has to login once a day. When he visits more than once, he is to be taken directly to the app with no login interaction. The auth flow is only required for authentication and not authorization (no need for access […]

By puterBoy
Published
Categorized as angular, msal, msal-angular, msal.js Tagged , , ,

MSAL Angular MsalGuard configuring local storage clear on token expiry

I am doing a POC on MSAL implementation on our Angular app. Requirements: The user has to login once a day. When he visits more than once, he is to be taken directly to the app with no login interaction. The auth flow is only required for authentication and not authorization (no need for access […]

By Senthamizh
Published
Categorized as angular, msal, msal-angular, msal.js Tagged , , ,

Get MSAL Interceptor Configuration from API

For a Static Web App (SPA) I have configured one endpoint /api/settings. This endpoint does not require authentication and returns a list of other endpoints that are needed in the application. Now the problem is, these endpoints returned by /api/settings do require authentication. In the code bellow, I need to configure protectedResourceMap with the response […]

By Vincent Bitter
Published
Categorized as angular, msal, msal-angular Tagged , ,

Is there a way to know when an msal redirect is in progress?

Im using the @azure/msal-browser and @azure/msal-angular packages in order to simply retrieve an MSAL token for my signed in users. Since all I really need is the token I have only provided the MsalService and MSAL_INSTANCE in my app.module.ts. I am using the redirect flow and have chosen to subscribe to the .handleRedirectObservable() method myself […]

By skyleguy
Published
Categorized as angular, azure, msal, msal-angular, redirect Tagged , , , ,
1 2 3 4

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq