From 3385e42039d3ef807d32927c0e20073536f674b2 Mon Sep 17 00:00:00 2001 From: Anatoli Beliaev Date: Thu, 13 Mar 2025 18:09:40 -0700 Subject: [PATCH 1/2] Set environment variable to avoid Get-AzAccessToken breaking change --- src/RequestProcessor.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/RequestProcessor.cs b/src/RequestProcessor.cs index 18fed1e1..7af235d1 100644 --- a/src/RequestProcessor.cs +++ b/src/RequestProcessor.cs @@ -106,6 +106,11 @@ internal StreamingMessage ProcessWorkerInitRequest(StreamingMessage request) Environment.SetEnvironmentVariable("AZUREPS_HOST_ENVIRONMENT", $"AzureFunctions/{workerInitRequest.HostVersion}"); Environment.SetEnvironmentVariable("POWERSHELL_DISTRIBUTION_CHANNEL", $"Azure-Functions:{workerInitRequest.HostVersion}"); + // Set the environment variable to force the Get-AzAccessToken to return a + // plaintext token and avoid the planned breaking change. + // TODO: Remove this for the next PowerShell version (7.6). + Environment.SetEnvironmentVariable("AZUREPS_OUTPUT_PLAINTEXT_AZACCESSTOKEN", "true"); + StreamingMessage response = NewStreamingMessageTemplate( request.RequestId, StreamingMessage.ContentOneofCase.WorkerInitResponse, From f451cc9050f07e33820f689af24c918d576692e4 Mon Sep 17 00:00:00 2001 From: Anatoli Beliaev Date: Thu, 13 Mar 2025 18:22:15 -0700 Subject: [PATCH 2/2] Update release notes --- release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_notes.md b/release_notes.md index 9af61cc8..16d551a7 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1 +1 @@ -* Use rpcBaseUrl in Durable operations when possible \ No newline at end of file +* Set environment variable to avoid Get-AzAccessToken breaking change \ No newline at end of file