question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Confused about @azure/ms-node-auth vs @azure/identity vs MSAL.js

See original GitHub issue

Describe the bug It is unclear what the difference is between @azure/ms-node-auth, @azure/identity, and MSAL.js. I do not know which lib to use when. If there is a doc that explains it, I cannot find one.

Expected behavior A doc explaining each library and when they should be used with examples.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:21 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
ramya-rao-acommented, Jan 12, 2021

@seanknox Please log an issue in the repo for @azure/ms-rest-browserauth for more on that package

We have https://github.com/Azure/azure-sdk-for-js/issues/12669 tracking improvements to the @azure/identity package which we will tackle this month.

We are independently tracking other efforts to improve documentation around auth. So, closing this issue.

Thanks for your patience everyone

2reactions
sadasantcommented, Nov 23, 2020

@southpolesteve :

I believe that the questions @diberry is working on will be helpful for you! Let me answer some of the other things you mention here.

It is unclear what the difference is between @azure/ms-node-auth, @azure/identity, and MSAL.js

  • @azure/ms-node-auth is the older authentication library! We’re planning some better integration with it to facilitate users to move towards our newer library.
  • @azure/identity is our newer library! This is the one that should be used if you want to authenticate any of our clients with the Azure services.
  • MSAL.js is a library that connects to the system-specific keychains to provide a same authentication experience across environments. @azure/identity uses MSAL.js under the hood!

When should each library be used?

Even though all of them can be used, @azure/identity is the library that should be used with the Azure SDK for JS clients.

@ramya-rao-a :

Update the readme for @azure/identity

I’ve made an issue! https://github.com/Azure/azure-sdk-for-js/issues/12669 . I’ll follow up this week.

See what improvements we can do to Authenticate with the Azure management modules for JavaScript.

I’ll take a look and I’ll make some notes!


While I move ahead with the readme update etc, how else can I be useful here? Please let me know if I’m missing something!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate your JavaScript application from ADAL.js to MSAL.js
How to update your existing JavaScript application to use the Microsoft Authentication Library (MSAL) for authentication and authorization ...
Read more >
ADAL and MSAL confusion - azure active directory
Since my project does not reference Microsoft.IdentityModel.Clients. · ADAL and MSAL are only for authorization and not authentication correct?
Read more >
Authenticating to Azure services with Azure AD and MSAL.js ...
As more and more services in Azure support modern & managed authentication using Azure Active Directory, you may begin to wonder, ...
Read more >
@azure/msal-browser - npm
Microsoft Authentication Library for JavaScript (MSAL.js) 2.0 for ... to authenticate users using Azure AD work and school accounts (AAD), ...
Read more >
Kubernetes, DAPR, and Azure Identity Example - Part III
Registering a Web Application – instructions for creating a web application that uses MSAL.js 2.0 or greater. On-Behalf-Of Flow – this describes how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found