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 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,