Difference Between Azure.Identity and Microsoft.Identity.Client Namespace

Karl Gardner 0 Reputation points
2024-07-14T18:19:27.91+00:00

Hello,

I am wondering what the difference is between these two namespaces from Microsoft:

Azure.Identity in Azure SDK for .Net:

https://learn.microsoft.com/en-us/dotnet/api/azure.identity?view=azure-dotnet

and Microsoft.Identity.Client in Microsoft Authentication Library (MSAL) in Entra ID:

https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client?view=msal-dotnet-latest

I have read the overviews of both of these and they seem nearly identical. Wondering what the difference of these are and the use cases of each?

Thanks,

Karl Gardner

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,598 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,461 questions
{count} votes

1 answer

Sort by: Most helpful
  1. akinbade abiola 8,215 Reputation points
    2024-07-14T22:12:31.0966667+00:00

    Yes they are different.

    Azure.Identity is Specialized for Azure services authentication. It simplifies getting tokens azure resources with a focus on managed identities and service principals.

    While MSAL is for various Microsoft services and custom APIs and provides user auth flows, token acquisition and various app support. It is suitable for user flows where you need to sign in a user and access resources.

    See: https://learn.microsoft.com/en-us/dotnet/api/azure.identity?view=azure-dotnet

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client?view=msal-dotnet-latest

    Please remember to 'Accept Answer' and 'Upvote' if you found the above information useful.

    Regards,

    Abiola

    0 comments No comments