Questions tagged msal

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

How to use methods of service in app.module.ts in MSAL azure application Angular

I am using config file and config service i want use config service in app module when i injected ConfigService in MSALInstanceFactory i am getting below error. can’t resolve all parameters of MSALInstanceFactory. I am not getting proper solution for this. Query is : How can i use ConfigService methods in app.module.ts enter image description […]

By Deepashree Kannoor
Categorized as angular, msal 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
Categorized as angular, angular11, msal, msal-angular Tagged , , ,

Angular – Store MSAL AuthToken in session storage and RefreshToken in local storage

How can I configure MSAL to store the RefreshToken in localStorage and the AuthToken in sessionStorage? Any idea on this? Thanks in advance! Source: Angular Questions

By simpller
Categorized as angular, authentication, jwt, msal, typescript Tagged , , , ,

MSAL OAuth for Angular and Java Spring Boot application

I am developing a web application which has front end in Angular and backend for frontend is written in Java Spring Boot. I want to use SSO for Microsoft. I have gone through all the documentation for Identity platform . It has tutorials for SPA (all frontend) as well as JAVA (all backend). However […]

By TahirRauf
Categorized as angular, java, msal, oauth-2.0, spring-boot 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’, […]

Angular Azure Login Switch Keys for Msal & B2C

Please, I needs your comments about that is the best options for switch of keys for MSAL and B2C Login. This this should change depending on clicking on a button, but app.module is not refresh the keys, Do you have any suggestions? app.component.ts import { setActivateKeys } from ‘../app-config’; … loginB2C(): void { setActivateKeys(true); } […]

By lyonTypescript
Categorized as angular, azure, msal Tagged , ,

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. […]

How to avoid Azure AD 256 redirect uri limit?

I have an Angular SPA application that runs on 300+ of distributed servers using Azure AD for authentication. Each server is its own application instance with its own database, so they need to remain as separate websites. The current Uris are: etc. how do I avoid the max redirect URI limit of […]

Disable specific endpoint from protectedResources on MSAL Angular

im working with MSALv2 on Angular 8, and I need disable the authentication for specific endpoints that dont need, is this possible? Here is my config: export function MSALInterceptorConfigFactory(): MsalInterceptorConfiguration { const protectedResourceMap = new Map<string, Array<string>>(); protectedResourceMap.set(‘’, [‘’]); protectedResourceMap.set(`${environment.API_URL}`, [‘api://f70731a6-6df1-4762-b267-54ea9741a7a2/’]); And I need disable the auth only for ${environment.API_URL}` / x-resource Thank you! Source: […]

By Jose Miguel Chac n
Categorized as angular, msal Tagged ,

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
Categorized as angular, msal, msal-angular, msal.js Tagged , , ,
1 2 3 10

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