Skip to content

api: add optional createIfNone to AzureAuthentication.getSessionWithScopes#1466

Merged
alexweininger merged 1 commit into
mainfrom
fix/auth-getsessionwithscopes-createifnone-api
Jun 3, 2026
Merged

api: add optional createIfNone to AzureAuthentication.getSessionWithScopes#1466
alexweininger merged 1 commit into
mainfrom
fix/auth-getsessionwithscopes-createifnone-api

Conversation

@alexweininger

Copy link
Copy Markdown
Member

Draft — contract-parity change for the resources API. Off the critical path for fixing microsoft/vscode-azurefunctions#5073; the runtime fix ships via the auth + appservice packages. Opened as a draft so the public API typing can be kept in sync when the auth change is consumed.

Summary

Mirrors the new optional options parameter (with createIfNone) added to @microsoft/vscode-azext-azureauth's getSessionWithScopes onto the public resources API AzureAuthentication.getSessionWithScopes, keeping the published contract in parity with the auth implementation.

Context

Part of microsoft/vscode-azurefunctions#5073. The functional fix lives in:

This PR is type-only and not required for the runtime fix (the appservice side accesses authentication structurally), but it keeps the documented public API accurate for consumers who want to pass options through the resources API typings.

Changes

  • getSessionWithScopes gains options?: GetSessionWithScopesOptions in api/src/resources/azure.ts.
  • New exported GetSessionWithScopesOptions interface.
  • Regenerated api/docs/vscode-azureresources-api.d.ts via api-extractor (verified in sync with dist/).
  • CHANGELOG Unreleased / Added entry.

Refs microsoft/vscode-azurefunctions#5073

…onWithScopes

Mirror the new optional `options` parameter (with `createIfNone`) added to
`@microsoft/vscode-azext-azureauth` onto the public resources API
`AzureAuthentication.getSessionWithScopes`, so the published contract stays in parity
with the auth implementation. Type-only change; regenerated the rolled-up d.ts via
api-extractor.

See microsoft/vscode-azurefunctions#5073

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 2, 2026 19:55

Copilot AI left a comment

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.

Pull request overview

This PR updates the public Azure Resources API typings to stay in contract parity with @microsoft/vscode-azext-azureauth by adding an optional options parameter (including createIfNone) to AzureAuthentication.getSessionWithScopes.

Changes:

  • Added options?: GetSessionWithScopesOptions to AzureAuthentication.getSessionWithScopes in the public API surface.
  • Introduced and exported GetSessionWithScopesOptions (with createIfNone?: boolean) and documented its behavior.
  • Regenerated the API extractor .d.ts output and added an Unreleased changelog entry describing the new option.
Show a summary per file
File Description
CHANGELOG.md Adds an Unreleased entry documenting the new optional options parameter and createIfNone behavior.
api/src/resources/azure.ts Updates the public API interface signature and exports GetSessionWithScopesOptions.
api/docs/vscode-azureresources-api.d.ts Regenerates the published API declaration to reflect the new signature and exported options interface.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/3 changed files
  • Comments generated: 0

@alexweininger alexweininger marked this pull request as ready for review June 2, 2026 20:04
@alexweininger alexweininger requested a review from a team as a code owner June 2, 2026 20:04
@bwateratmsft bwateratmsft self-requested a review June 2, 2026 20:09
@alexweininger alexweininger merged commit 1836610 into main Jun 3, 2026
4 checks passed
@alexweininger alexweininger deleted the fix/auth-getsessionwithscopes-createifnone-api branch June 3, 2026 16:52
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.

3 participants