Skip to content

Skills auth regenerate dotnet#301

Merged
kvenkatrajan merged 1 commit into
microsoft:mainfrom
KarishmaGhiya:skills-auth-regenerate-dotnet
May 5, 2026
Merged

Skills auth regenerate dotnet#301
kvenkatrajan merged 1 commit into
microsoft:mainfrom
KarishmaGhiya:skills-auth-regenerate-dotnet

Conversation

@KarishmaGhiya
Copy link
Copy Markdown
Member

@KarishmaGhiya KarishmaGhiya commented Apr 29, 2026

Update .NET auth and environment variable patterns

Regenerates all Azure SDK skills for .NET (26 skills) to use the updated authentication and environment variable guidance from \skill-creator.

Changes

Authentication section (all 26 skills):

  • .NET: Use
    ew DefaultAzureCredential(DefaultAzureCredential.DefaultEnvironmentVariableName)\ instead of
    ew DefaultAzureCredential()\

Environment Variables section (all 26 skills):

  • Add \AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production\
  • Add inline comments to all env vars explaining their purpose

skill-creator template:

  • Updated C# snippet with \DefaultAzureCredential.DefaultEnvironmentVariableName\ constructor overload

Skills updated

.NET (26 skills): azure-ai-agents-persistent, azure-ai-document-intelligence, azure-ai-openai, azure-ai-projects, azure-ai-voicelive, azure-eventgrid, azure-eventhub, azure-maps-search, azure-mgmt-apicenter, azure-mgmt-apimanagement, azure-mgmt-applicationinsights, azure-mgmt-arizeaiobservabilityeval, azure-mgmt-botservice, azure-mgmt-fabric, azure-mgmt-mongodbatlas, azure-mgmt-weightsandbiases, azure-resource-manager-cosmosdb, azure-resource-manager-durabletask, azure-resource-manager-mysql, azure-resource-manager-playwright, azure-resource-manager-postgresql, azure-resource-manager-redis, azure-resource-manager-sql, azure-search-documents, azure-security-keyvault-keys, azure-servicebus

Skipped (correctly)

  • azure-identity-*: Reference/educational skills

  • m365-agents-dotnet, microsoft-azure-webjobs-extensions-authentication-events-dotnet: No auth section

PersistentAgentsClient client = new(projectEndpoint, new DefaultAzureCredential());
// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
var credential = new DefaultAzureCredential(
DefaultAzureCredential.DefaultEnvironmentVariableName
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DefaultAzureCredential(string) constructor and DefaultAzureCredential.DefaultEnvironmentVariableName constant were introduced in version 1.16.0. None of the skills specify a minimum package version, so developers using older versions will get a compiler error.

Unless the agent is expected to always use the latest version of Azure.Identity, it might be a good idea to specify a 1.16.0 as the minimum version required for Azure.Identity here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KarishmaGhiya I would suggest to specify that in these lines:

In the using statement:
https://github.com/KarishmaGhiya/skills/blob/ce1256406ed963c7b3231928882734e68c159b1a/.github/skills/skill-creator/SKILL.md?plain=1#L130

using Azure.Identity; // Requires Azure.Identity >= 1.16.0

and the installation bullet point: https://github.com/KarishmaGhiya/skills/blob/ce1256406ed963c7b3231928882734e68c159b1a/.github/skills/skill-creator/SKILL.md?plain=1#L105

1. Installation — pip install, npm install, etc. For .NET skills using DefaultAzureCredential.DefaultEnvironmentVariableName, specify dotnet add package Azure.Identity --version 1.16.0 or later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add this as a validation point to hyoka testing to validate whether LLM will detect to use the latest version or the appropriate version of identity for this feature. @JonathanCrd

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question @JonathanCrd, I think it will be interesting to see how the skills are translated in this case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue tracking - #312

- Use DefaultAzureCredential(DefaultEnvironmentVariableName) in 26 .NET skills
- Add ManagedIdentityCredential as production alternative with credential classes link
- Add AZURE_TOKEN_CREDENTIALS=prod to Environment Variables sections
- Add inline comments to all env vars explaining purpose

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kvenkatrajan kvenkatrajan merged commit f263c71 into microsoft:main May 5, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

4 participants