Skip to content

Commit 613e304

Browse files
authored
Set environment variable to avoid Get-AzAccessToken breaking change (#1106)
* Set environment variable to avoid Get-AzAccessToken breaking change * Update release notes
1 parent 98033c2 commit 613e304

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

release_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* Use rpcBaseUrl in Durable operations when possible
1+
* Set environment variable to avoid Get-AzAccessToken breaking change

src/RequestProcessor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ internal StreamingMessage ProcessWorkerInitRequest(StreamingMessage request)
106106
Environment.SetEnvironmentVariable("AZUREPS_HOST_ENVIRONMENT", $"AzureFunctions/{workerInitRequest.HostVersion}");
107107
Environment.SetEnvironmentVariable("POWERSHELL_DISTRIBUTION_CHANNEL", $"Azure-Functions:{workerInitRequest.HostVersion}");
108108

109+
// Set the environment variable to force the Get-AzAccessToken to return a
110+
// plaintext token and avoid the planned breaking change.
111+
// TODO: Remove this for the next PowerShell version (7.6).
112+
Environment.SetEnvironmentVariable("AZUREPS_OUTPUT_PLAINTEXT_AZACCESSTOKEN", "true");
113+
109114
StreamingMessage response = NewStreamingMessageTemplate(
110115
request.RequestId,
111116
StreamingMessage.ContentOneofCase.WorkerInitResponse,

0 commit comments

Comments
 (0)