MsalInterceptor and MsalService classes are no longer working in providers property for standalone projects #6040
Labels
bug-unconfirmed
A reported bug that needs to be investigated and confirmed
msal-angular
Related to @azure/msal-angular package
msal-browser
Related to msal-browser package
public-client
Issues regarding PublicClientApplications
question
Customer is asking for a clarification, use case or information.
Core Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.37.0
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
2.5.7
Public or Confidential Client?
Public
Description
I'm building an angular project using the standlone api, so in my app, I no longer rely on the AppModule to configure providers. I used to do so but many things have changed with the standalone api for example providers are now functions instead of classes.
This is not working actually and I think it's because of the new approach to define providers, by usingfunctions.
Error Message
main.ts:7 Error: NG0204: Can't resolve all parameters for MsalInterceptor: (?, ?, ?, ?, ?).
at getUndecoratedInjectableFactory (core.mjs:9296:15)
at injectableDefOrInjectorDefFactory (core.mjs:9286:16)
at providerToFactory (core.mjs:9354:51)
at providerToRecord (core.mjs:9316:25)
at R3Injector.processProvider (core.mjs:9213:24)
at core.mjs:9041:59
at forEachSingleProvider (core.mjs:9387:13)
at new R3Injector (core.mjs:9041:9)
at new EnvironmentNgModuleRefAdapter (core.mjs:21574:26)
at internalCreateApplication (core.mjs:26694:25)
Msal Logs
No response
MSAL Configuration
Relevant Code Snippets
Before:
After:
Login component:
Reproduction Steps
Before:
After:
Expected Behavior
This is to let msal handles the token acquisition for api requests.
Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
Chrome, Edge
Regression
No response
Source
Internal (Microsoft)
The text was updated successfully, but these errors were encountered: