Questions tagged msal-angular

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

How to assign and use runtime config values in App.module in angular

I have a situation where i need to replace some of the hardcoded values with config.json values in the app.module. can we do that ? am able to add APP_INITIALIZER and useFactory and able to inject service in other components and that is working fine but not able to achieve with in app.module. I want […]

Dynamic configuration of MSAL 2 in Angular

For my Angular (v12) application, I use MSAL for Authentication and I’m facing an issue on configuration. In configuration, I have tenantId and app Id to initialize MSAL. I cannot use the standard Angular configuration switching with environment.ts since it cannot be changed in a post build step. Instead, I try to load a json […]

After Upgrading to msal v2 in angular, I am getting this error crbug/1173575, non-JS module files deprecated

I am trying to update the msal version to 2.0.0. All the config is completed. I am using Angular version 10 and I use the following command while building the angular application since I am not using the root path ng build –base-href=/mywebsite/ Application is running fine in this url www.test.com/mywebsite. But After the login […]

By John Vinosh
Published
Categorized as angular, msal, msal-angular Tagged , ,

Angular APP_INITIALIZER in module not working properly

I have auth module which imports and sets msal configuration before app is initializer. I’m using APP_INITIALIZER to block the init of the app and get configuration for MSAL-ANGULAR. The issue is only with Firefox. The app is working perfectly fine on Chrome, Egde, Safari but not on Firefox. On every other browser different than […]

Token call are block in hidden iframes Angular 8+

Configuration: "@azure/msal-angular": "^1.1.2", "msal": "^1.4.4", "rxjs": "~6.4.0", Angular 8+ export const msalConfig: Configuration = { auth: { clientId: environment.msalModule.clientID, authority: environment.msalModule.authority, redirectUri: environment.msalModule.redirectUri, validateAuthority: true, postLogoutRedirectUri: environment.msalModule.redirectUri, navigateToLoginRequestUrl: true }, cache: { cacheLocation: ‘localStorage’, } } export const angularConfig: MsalAngularConfiguration = { popUp: false, consentScopes: [ ‘user.read’, environment.msalModule.appScope ], protectedResourceMap: protectedResourceMap } I have Angular […]

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

MSAL Angular : Invalid client. The request body must contain the following parameter ‘client_assertion’ or ‘client secret’

I am developing Angular project and working Azure authentication using MSAL. It is working with Angular 10 and MSAL version V1 but not working with Angular 11 and MSAL v2. Getting Invalid client. The request body must contain the following parameter ‘client_assertion’ or ‘client secret’ error as unauthorized response. Below code have added `export function […]

By Sunita More
Published
Categorized as angular, msal-angular Tagged ,

Use AD B2C and MSAL v2 with Angular allowing selective unprotected Web API calls

My goal is to allow users to freely browse an Angular 11+ site, reading data called from a .NET Web API as they navigate. Only users who wish to post data or access particular features would need to sign up and sign in, using AD B2C identity services. Accordingly, controllers in the backend app service […]

MSAL v2 Angular Problem in Teams Desktop App

We are facing an AAD login issue for our web application (node.js + angular 10) in MS Teams Desktop & Mobile app while our users easily login by clicking a login button in any web browser or MS teams web client. In Angular, we are using two library (@azure/msal-browser msal and @azure/msal-common) and using graph […]

How to use refresh token coming from acquiretoken silent in MSAL-browser

I am trying to acquire token by aquiretokensilent after login and then have to do authorization in multiple modules.As documentation of MSAL-browser acquiretokensilent will automatically take care of refresh token.In network tab also i am able to see refresh token.But how to use it, does it automatically replace access token or do i need to […]

Not getting token with acquireTokensilent but getting tokens with acquireTokenpopup Msal-browser

I am updating MSAL version 1.x to MSAL-browser in angular.So I am trying to migrate from version 1.x to 2.X.I was able to replace code successfully and it is working fine. but I am getting issue with acquireTokenSilent but its working fine by using acquireTokenPopup. I am following this link: https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/v1-migration.md. This is latest library […]

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