Reputation: 75
I have an Angular 11 project where I'm trying to import MSAL_CONFIG in app.module, but I only get the error above.
import { MsalBroadcastService, MSAL_CONFIG, MsalGuard, MsalGuardConfiguration, MsalInterceptor, MsalInterceptorConfiguration, MsalModule,
All the other classes are imported correctly. Why is this?
In package.jxon I'm using "@azure/msal-angular": "^2.0.0", "@azure/msal-browser": "^2.16.1",
Upvotes: 1
Views: 8920
Reputation: 744
Remove all MSAL_CONFIG
References from your app.module.ts
And add the guard and/or interceptor configs if you need them (MSAL_GUARD_CONFIG and MSAL_INTERCEPTOR_CONFIG). This is a good example for angular 11 using their documentation. https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v2-samples/angular11-sample-app/src/app/app.module.ts
Edit: most recent angular 15 example link. https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular15-sample-app/src/app/app.module.ts
Upvotes: 1