Skip to content

feat(opencode): added in oauth connection for azure provider through MS Entra ID and az cli#31351

Open
OpeOginni wants to merge 13 commits into
anomalyco:devfrom
OpeOginni:feat/azure-oauth
Open

feat(opencode): added in oauth connection for azure provider through MS Entra ID and az cli#31351
OpeOginni wants to merge 13 commits into
anomalyco:devfrom
OpeOginni:feat/azure-oauth

Conversation

@OpeOginni

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #31342
Closes #21658

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This PR adds another login method for the Azure and Azure Cognitive Services providers.

This would be an alternative for teams that don't have access to API keys for the deployed resources.

  • Adds instructions and link to Azure docs explaining how to setup proper Roles to use the Resources
  • Makes use of the az cli and Bun Spawn to get the access keys to be used, tried the @azure/identity package, but would make Bun and the TUI to crash.
  • Updated docs to show that this is now an option.

How did you verify your code works?

Tested locally but logging in fresh to the azure provider using the Oauth method, after completely logging in on the az cli

Screenshots / recordings

Screen.Recording.2026-06-08.at.12.58.05.mov

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@Uranium2

Copy link
Copy Markdown

Can someone check this and try to include in the next realeases? A lot of people are blocked with the new GitHub Copilot pricing policy and would like to use Azure OpenAI and have security policy constraints on using API keys.

@rekram1-node

Copy link
Copy Markdown
Collaborator

/review

Comment thread packages/opencode/src/plugin/azure.ts Outdated
@rekram1-node

Copy link
Copy Markdown
Collaborator

/review

Comment thread packages/opencode/src/provider/provider.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Azure AI Foundry Microsoft Entra (OAuth) authentication Use OpenAI Azure without APIKEY

3 participants