Update Java skills auth and env vars with requireEnvVars pattern#300
Open
KarishmaGhiya wants to merge 1 commit intomicrosoft:mainfrom
Open
Update Java skills auth and env vars with requireEnvVars pattern#300KarishmaGhiya wants to merge 1 commit intomicrosoft:mainfrom
KarishmaGhiya wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Member
KarishmaGhiya
commented
Apr 29, 2026
- 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
- 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>
samvaity
reviewed
Apr 29, 2026
| .requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS) | ||
| .build(); | ||
| // Or use a specific credential directly in production: | ||
| // See https://learn.microsoft.com/java/api/overview/azure/identity-readme?view=azure-java-stable#credential-classes |
Contributor
There was a problem hiding this comment.
is this reference needed?
Comment on lines
+150
to
+152
| TokenCredential credential = new DefaultAzureCredentialBuilder() | ||
| .requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS) | ||
| .build(); |
Contributor
There was a problem hiding this comment.
Do you know if this should also reflect/update the examples here https://github.com/microsoft/skills/blob/main/.github/plugins/azure-sdk-java/skills/azure-ai-agents-persistent-java/references/examples.md#with-defaultazurecredential-recommended ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.