Skills auth regenerate dotnet#301
Conversation
- 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
nit
| 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) |
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):
ew DefaultAzureCredential(DefaultAzureCredential.DefaultEnvironmentVariableName)\ instead of
ew DefaultAzureCredential()\
ew DefaultAzureCredentialBuilder().requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS).build()\
Environment Variables section (all 46 skills):
skill-creator template:
equireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)\ and \ManagedIdentityCredentialBuilder\
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)