A cloud-based identity and access management service for securing user authentication and resource access
After updating to Azure.Identity from 1.10 to 1.11, I can no longer authenticate console application.
I have a small LOB console application that needs to authenticate against Entra ID. The console app uses an IPublicClientApplication for acquiring the token interactively (since I need an MFA claim). Doing it this way, would trigger a pop-up window to select the user. This code looks like the below and worked fine using Azure.Identity up to version 1.10.4:
var app = PublicClientApplicationBuilder.Create(ClientAppId)
.WithAuthority("https://login.windows.net", tenantDomain, true)
.Build();
Microsoft.Identity.Client.AuthenticationResult? result = await app.AcquireTokenInteractive(scopes)
.ExecuteAsync();
After updating to 1.11.x (and also 1.12.x), the same code opens the challenge in a new web browser tab and when returning to the application throws an exception: "AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'."
It's a public client app which doesn't take a client secret. I've already double checked the "Allow public client flows" in my Entra App registration and my manifest includes an "allowPublicClient": true reference (as is suggested in the Stack Overflow article that seems to be THE answer for this exception). If I downgrade the NuGet package back to Azure.Identity 1.10, it works again.
I can't find any reference to breaking changes between versions. I'm not sure if this is a bug or what I can do to reconfigure my application to use the newer SDK.
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Developer technologies | ASP.NET Core | Other
A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
1 deleted comment
Comments have been turned off. Learn more