api: add optional createIfNone to AzureAuthentication.getSessionWithScopes#1466
Merged
alexweininger merged 1 commit intoJun 3, 2026
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
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?: GetSessionWithScopesOptionstoAzureAuthentication.getSessionWithScopesin the public API surface. - Introduced and exported
GetSessionWithScopesOptions(withcreateIfNone?: boolean) and documented its behavior. - Regenerated the API extractor
.d.tsoutput 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
bwateratmsft
approved these changes
Jun 2, 2026
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.
Summary
Mirrors the new optional
optionsparameter (withcreateIfNone) added to@microsoft/vscode-azext-azureauth'sgetSessionWithScopesonto the public resources APIAzureAuthentication.getSessionWithScopes, keeping the published contract in parity with the auth implementation.Context
Part of microsoft/vscode-azurefunctions#5073. The functional fix lives in:
@microsoft/vscode-azext-azureauth— adds thecreateIfNoneoption (auth: add optional createIfNone to getSessionWithScopes vscode-azuretools#2314)@microsoft/vscode-azext-azureappservice— eagerly consents to the App Service audience using it (appservice: eagerly consent to App Service audience before Kudu/SCM calls vscode-azuretools#2315)This PR is type-only and not required for the runtime fix (the appservice side accesses
authenticationstructurally), but it keeps the documented public API accurate for consumers who want to passoptionsthrough the resources API typings.Changes
getSessionWithScopesgainsoptions?: GetSessionWithScopesOptionsinapi/src/resources/azure.ts.GetSessionWithScopesOptionsinterface.api/docs/vscode-azureresources-api.d.tsviaapi-extractor(verified in sync withdist/).Unreleased / Addedentry.Refs microsoft/vscode-azurefunctions#5073