Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatchManagementClient example uses ADAL, which is out of support in December 2022 #314

Open
Chris-Johnston opened this issue Sep 14, 2022 · 1 comment

Comments

@Chris-Johnston
Copy link

Chris-Johnston commented Sep 14, 2022

I've been referring to these samples to figure out how to use the BatchManagementClient. (The other Batch client doesn't support user-assigned managed identity) The package Microsoft.IdentityModel.Clients.ActiveDirectory is deprecated and will stop receiving updates in December 2022 (3 months as of writing).

<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.2.0" />

The sample should be updated to instead use Microsoft.Identity.Client, which would look something like this. It would also be great to update beyond .net462.

var cred = new DefaultAzureCredential(false); // I'm running this on an azure function, with system managed identity.
var token = cred.GetTokenAsync(new TokenRequestContext(new string[]
{
    "https://management.core.windows.net/",
}));
using var batchManagementClient = new BatchManagementClient(new TokenCredentials(token.Result.Token));
@BC89
Copy link

BC89 commented Feb 15, 2023

Is this going to be addressed? ADAL, really. FOR SHIZZZLLLEEE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants