MSAL package issues
We are trying to migrate our application from angular 15 to angular 17 and come across compatibility issues with MSAL library. Is there any alternative to make this work with angular 17 or alternative package to this?
.NET
ASP.NET Core
ASP.NET
-
JamesTran-MSFT 36,556 Reputation points • Microsoft Employee2023-12-21T20:23:21.6033333+00:00 Thank you for your post!
I understand that you're running into compatibility issues with MSAL the library while migrating your application from Angular 15 to Angular 17, and to hopefully help point you in the right direction, can you share some more info below?
- Can you share a screenshot of what error messages you're running into?
- What MSAL Angular version (v1, v2, v3) are you currently using? For more info.
- Since you're upgrading more than one major version at a time, are you following the Angular Update Guide?
Since our MSAL experts are actively answering questions within their GitHub repo, I'd also recommend reaching out to them there so they can take a closer look into your issue.
- MSAL Angular - Community Help and Support
- MSAL Angular - GitHub Issues
- MSAL Angular - Stack Overflow
Additional Links:
I hope this helps!
If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.
-
Jothivel, Nandhini Priya 0 Reputation points
2024-01-02T13:07:05.3066667+00:00 Hi James,
Thanks for looking into this, please find my response below
- Attached screenshot
- MSAL Angular version V3
- I have upgraded Angular from V15 to 16 and MSAL package is working fine, later when I upgrade from V16 to V17, I am facing issue
-
José Pablo Ramirez (a. k. a. webJose) 440 Reputation points
2024-01-06T17:42:57.68+00:00 Is it just me? Or there is no screenshot? It would be nicer if you posted the error as text in a comment or update your question to include it.
-
Konrad Viltersten 5 Reputation points
2024-01-20T09:18:29.5733333+00:00 There's no real need for the screenshot, actually. It's extremely simply to reproduce in a vanilla setup. The problem's that Angular has changed from version 17 and registers the services under an entirely new paradigm. Previously, the DI was based on the registrations in the module. Now, they introduced a stand-alone approach so that the services aren't registered from the central module-file. Instead, each service defines where it's provided by a decorator in the service itself. The current MSAL package (version 3) will support Angular 16 and down, since those are applying the older paradigm for registering services. We've spent a few days trying to find a workaround to make it work. We ended up downgrading to Angular version 16. In my opinion, this is a huge boo-boo that MSAL team missed such a profound change in Angular 17. It's been released in November last year and announced way before that. They had months to address it. In this case, it's not the poster that made a mistake. It's the miss by MS. And it sucks extra much because that given more argument for people to go with React or Vue, instead of Angular. Not happy about that.
-
Bruce (SqlWork.com) 62,386 Reputation points
2024-01-21T23:27:57.6433333+00:00 the msal.js team supplies a working javascript implementation of oauth. they also supply wrappers for popular frameworks.
it is not the msal.js teams fault that angular 17 does not support angular 15/16 component libraries. the msal library will need to be updated to support 17 but stay compatible with earlier versions. this is not necessary trivial. angular experts will need to weigh in on the correct solution.
follow this thread: https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/6719
note: react probably get better support because its less volatile and is the choice of the office team for their development (office.com, teams)
-
Konrad Viltersten 5 Reputation points
2024-01-22T19:49:34.0566667+00:00 I disagree with your sentiment. While technically correct as a statement, claiming that they have no responsibility is a bit misled, in my opinion. We're talking about a major player in the industry who aspires to be the goto platform. Angular is a major framework (using Microsoft's language per agreement with Google). They do carry the responsibility by the concept of a great and reliable instance. (Not legally, as you correctly point out, but reputationally.) I also disagree with the statement of Angular being volatile. It's been quite stable and reliable since a long time with upgrades doing charms. Occasionally, there are heavier changes (which is a good thing) but quite rarely. The requirement for backwards compatibility is, in my view, false. If you check out the history, there's v3 of MSAL and there's nothing stopping them from releasing v4 to support v17 of Angular. So, in conclusion, I feel that I am in my right to expect more from MSAL creators. Unless they aspire to the level of YAF provider but then, we're losing so much of the reliability and smoothness that the combo of Azure/NET/Angular provides. It'd be a shame and, yes, I allow myself some rant'ish bit**ing about it. :)
-
Deleted
This comment has been deleted due to a violation of our Code of Conduct. The comment was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Sign in to comment