Skip to content

Skills auth regenerate dotnet#301

Open
KarishmaGhiya wants to merge 2 commits intomicrosoft:mainfrom
KarishmaGhiya:skills-auth-regenerate-dotnet
Open

Skills auth regenerate dotnet#301
KarishmaGhiya wants to merge 2 commits intomicrosoft:mainfrom
KarishmaGhiya:skills-auth-regenerate-dotnet

Conversation

@KarishmaGhiya
Copy link
Copy Markdown
Member

@KarishmaGhiya KarishmaGhiya commented Apr 29, 2026

Update .NET and Java skills auth and environment variable patterns

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

Changes

Authentication section (all 46 skills):

  • .NET: Use
    ew DefaultAzureCredential(DefaultAzureCredential.DefaultEnvironmentVariableName)\ instead of
    ew DefaultAzureCredential()\
  • Java: Use
    ew DefaultAzureCredentialBuilder().requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS).build()\
  • Add \ManagedIdentityCredential\ as production alternative with credential classes reference link
  • Add comment: // Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>\

Environment Variables section (all 46 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 Java snippet with
    equireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)\ and \ManagedIdentityCredentialBuilder\
  • 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

Java (20 skills): azure-ai-agents-persistent, azure-ai-anomalydetector, azure-ai-contentsafety, azure-ai-formrecognizer, azure-ai-projects, azure-ai-vision-imageanalysis, azure-ai-voicelive, azure-appconfiguration, azure-communication-callautomation, azure-communication-sms, azure-compute-batch, azure-data-tables, azure-eventgrid, azure-eventhub, azure-messaging-webpubsub, azure-monitor-ingestion, azure-monitor-query, azure-security-keyvault-keys, azure-security-keyvault-secrets, azure-storage-blob

Skipped (correctly)

  • azure-identity-*: Reference/educational skills
  • azure-cosmos-java: Key-only auth (no DefaultAzureCredential)
  • m365-agents-dotnet, microsoft-azure-webjobs-extensions-authentication-events-dotnet: No auth section
  • azure-communication-callingserver/chat/common-java, azure-monitor-opentelemetry-exporter-java: No auth section

KarishmaGhiya and others added 2 commits April 29, 2026 00:41
- Add requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS) to DefaultAzureCredentialBuilder in 20 Java skills
- Add ManagedIdentityCredentialBuilder 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
- Update skill-creator with Java and C# auth patterns

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- 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>
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.

DOCUMENT_INTELLIGENCE_ENDPOINT=https://<resource-name>.cognitiveservices.azure.com/ # Required: Document Intelligence endpoint
DOCUMENT_INTELLIGENCE_API_KEY=<your-api-key> # Only required for AzureKeyCredential auth
BLOB_CONTAINER_SAS_URL=https://<storage>.blob.core.windows.net/<container>?<sas-token> # Optional: blob container SAS URL for training data
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
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.

nit

Suggested change
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
AZURE_TOKEN_CREDENTIALS=prod # Required when using DefaultAzureCredential in production (restricts to deployed-service credentials only)

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.

3 participants