Skip to content

Update Java skills auth and env vars with requireEnvVars pattern#300

Open
KarishmaGhiya wants to merge 1 commit intomicrosoft:mainfrom
KarishmaGhiya:skills-auth-regenerate-java
Open

Update Java skills auth and env vars with requireEnvVars pattern#300
KarishmaGhiya wants to merge 1 commit intomicrosoft:mainfrom
KarishmaGhiya:skills-auth-regenerate-java

Conversation

@KarishmaGhiya
Copy link
Copy Markdown
Member

  • 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>
.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
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.

is this reference needed?

Comment on lines +150 to +152
TokenCredential credential = new DefaultAzureCredentialBuilder()
.requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)
.build();
Copy link
Copy Markdown
Contributor

@samvaity samvaity Apr 29, 2026

Choose a reason for hiding this comment

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

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.

2 participants