You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(azure.ai.agents): add full OAuth2 fields and connector-name support (#8358)
* feat(azure.ai.agents): move OAuth2 to raw REST, add full OAuth2 fields
Fixes#8355
Move OAuth2 from typed ARM SDK path to raw REST to support fields
not modeled in the ARM Go SDK: authorizationUrl, tokenUrl, refreshUrl,
scopes, and connectorName.
New flags for connection create:
--authorization-url OAuth2 authorization endpoint
--token-url OAuth2 token endpoint
--refresh-url OAuth2 refresh endpoint
--scopes OAuth2 scopes (space-separated)
--connector-name Managed connector name
OAuth2 credentials (--client-id/--client-secret) now sent as nested
credentials object in the raw REST body.
Update path also routes oauth2 through raw REST for consistency.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add either/or validation for OAuth2 connector-name vs BYO fields
OAuth2 auth now supports two mutually exclusive modes:
- --connector-name alone (managed connector flow)
- All of --authorization-url, --token-url, --refresh-url, --scopes,
--client-id, --client-secret together (BYO OAuth2)
Partial combinations are rejected with a clear error listing missing flags.
Added test for connector-name-only body serialization.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: allow --audience for project-managed-identity, scopes are comma-separated
Address Linda's review comments:
- --audience now also valid with --auth-type project-managed-identity
- --scopes help text updated to comma-separated (was space-separated)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address PR review — scopes as []string, optional refresh-url, validation tests
- Change Scopes from string to []string to match schema wire format
- Switch --scopes flag to StringSliceVar (repeatable/comma-separated)
- Make --refresh-url and --scopes optional in BYO OAuth2 validation
- Fix test: remove ConnectorName from BYO test (mutually exclusive)
- Add TestOAuth2Validation with 7 subtests covering all branches
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: resolve lint failures — gofmt alignment and gosec nolint annotations
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Naman Tyagi <namantyagi@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments