Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Az CLI task fails often when addSpnToEnvironment: true #18998

Closed
1 of 4 tasks
syedhamjath opened this issue Sep 20, 2023 · 1 comment
Closed
1 of 4 tasks

[BUG]: Az CLI task fails often when addSpnToEnvironment: true #18998

syedhamjath opened this issue Sep 20, 2023 · 1 comment

Comments

@syedhamjath
Copy link

syedhamjath commented Sep 20, 2023

Task name

AzureCLI

Task version

2

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows_NT 10.0.17763

Task log

2023-09-20T08:43:25.0335721Z ##[debug]Evaluating condition for step: 'Set credentials (RG SPN) for PrivilegedContext'
2023-09-20T08:43:25.0336803Z ##[debug]Evaluating: SucceededNode()
2023-09-20T08:43:25.0337007Z ##[debug]Evaluating SucceededNode:
2023-09-20T08:43:25.0337391Z ##[debug]=> True
2023-09-20T08:43:25.0337636Z ##[debug]Result: True
2023-09-20T08:43:25.0337910Z ##[section]Starting: Set credentials (RG SPN) for PrivilegedContext
2023-09-20T08:43:25.0471816Z ==============================================================================
2023-09-20T08:43:25.0472075Z Task         : Azure CLI
2023-09-20T08:43:25.0472147Z Description  : Run Azure CLI commands against an Azure subscription in a PowerShell Core/Shell script when running on Linux agent or PowerShell/PowerShell Core/Batch script when running on Windows agent.
2023-09-20T08:43:25.0472313Z Version      : 2.225.0
2023-09-20T08:43:25.0472382Z Author       : Microsoft Corporation
2023-09-20T08:43:25.0472450Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-cli
2023-09-20T08:43:25.0472576Z ==============================================================================
2023-09-20T08:43:25.0778316Z ##[debug]Using node path: C:\Data\Agent\externals\node16\bin\node.exe
2023-09-20T08:43:25.2596401Z ##[debug]agent.TempDirectory=C:\Data\Agent\_work\_temp
2023-09-20T08:43:25.2618895Z ##[debug]loading inputs and endpoints
2023-09-20T08:43:25.2659286Z ##[debug]loading ENDPOINT_AUTH_e636603a-3e3b-4322-a62c-e6c580aec420
2023-09-20T08:43:25.2696996Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_e636603a-3e3b-4322-a62c-e6c580aec420_AUTHENTICATIONTYPE
2023-09-20T08:43:25.2699592Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_e636603a-3e3b-4322-a62c-e6c580aec420_SCOPE
2023-09-20T08:43:25.2702562Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_e636603a-3e3b-4322-a62c-e6c580aec420_SERVICEPRINCIPALID
2023-09-20T08:43:25.2704963Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_e636603a-3e3b-4322-a62c-e6c580aec420_SERVICEPRINCIPALKEY
2023-09-20T08:43:25.2707231Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_e636603a-3e3b-4322-a62c-e6c580aec420_TENANTID
2023-09-20T08:43:25.2710707Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2023-09-20T08:43:25.2713265Z ##[debug]loading ENDPOINT_AUTH_SCHEME_e636603a-3e3b-4322-a62c-e6c580aec420
2023-09-20T08:43:25.2716452Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2023-09-20T08:43:25.2719977Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2023-09-20T08:43:25.2724782Z ##[debug]loading INPUT_ADDSPNTOENVIRONMENT
2023-09-20T08:43:25.2728457Z ##[debug]loading INPUT_CONNECTEDSERVICENAMEARM
2023-09-20T08:43:25.2731743Z ##[debug]loading INPUT_CWD
2023-09-20T08:43:25.2735068Z ##[debug]loading INPUT_FAILONSTANDARDERROR
2023-09-20T08:43:25.2738094Z ##[debug]loading INPUT_INLINESCRIPT
2023-09-20T08:43:25.2740373Z ##[debug]loading INPUT_POWERSHELLERRORACTIONPREFERENCE
2023-09-20T08:43:25.2742325Z ##[debug]loading INPUT_POWERSHELLIGNORELASTEXITCODE
2023-09-20T08:43:25.2744240Z ##[debug]loading INPUT_SCRIPTLOCATION
2023-09-20T08:43:25.2746277Z ##[debug]loading INPUT_SCRIPTPATH
2023-09-20T08:43:25.2748117Z ##[debug]loading INPUT_SCRIPTTYPE
2023-09-20T08:43:25.2751217Z ##[debug]loading INPUT_USEGLOBALCONFIG
2023-09-20T08:43:25.2755325Z ##[debug]loading SECRET_ANSIBLETOWER_KEY
2023-09-20T08:43:25.2757557Z ##[debug]loading SECRET_ANSIBLETOWER_USER_PART
2023-09-20T08:43:25.2759665Z ##[debug]loading SECRET_BUILDER_PASSWORD
2023-09-20T08:43:25.2763030Z ##[debug]loading SECRET_DACPACTOKEN
2023-09-20T08:43:25.2765286Z ##[debug]loading SECRET_GLOBALREPORTPASSWORD
2023-09-20T08:43:25.2767302Z ##[debug]loading SECRET_IB_APPLICATION_GATEWAY_SECRET
2023-09-20T08:43:25.2769305Z ##[debug]loading SECRET_SERVICENOW_OA_DEV_CLIENT_ID
2023-09-20T08:43:25.2771125Z ##[debug]loading SECRET_SERVICENOW_OA_DEV_CLIENT_SECRET
2023-09-20T08:43:25.2773106Z ##[debug]loading SECRET_SERVICENOW_OA_DEV_REFRESH_TOKEN
2023-09-20T08:43:25.2774915Z ##[debug]loading SECRET_SERVICENOW_OA_ET_CLIENT_ID
2023-09-20T08:43:25.2776807Z ##[debug]loading SECRET_SERVICENOW_OA_ET_CLIENT_SECRET
2023-09-20T08:43:25.2779112Z ##[debug]loading SECRET_SERVICENOW_OA_ET_REFRESH_TOKEN
2023-09-20T08:43:25.2782146Z ##[debug]loading SECRET_SERVICENOW_OA_PR_CLIENT_ID
2023-09-20T08:43:25.2784371Z ##[debug]loading SECRET_SERVICENOW_OA_PR_CLIENT_SECRET
2023-09-20T08:43:25.2786337Z ##[debug]loading SECRET_SERVICENOW_OA_PR_REFRESH_TOKEN
2023-09-20T08:43:25.2788149Z ##[debug]loading SECRET_SERVICENOW_OA_ST_CLIENT_ID
2023-09-20T08:43:25.2789923Z ##[debug]loading SECRET_SERVICENOW_OA_ST_CLIENT_SECRET
2023-09-20T08:43:25.2791794Z ##[debug]loading SECRET_SERVICENOW_OA_ST_REFRESH_TOKEN
2023-09-20T08:43:25.2793499Z ##[debug]loading SECRET_SOLO_FORTIFYSSC_ANALYSISUPLOADTOKEN
2023-09-20T08:43:25.2795289Z ##[debug]loading SECRET_SQL_PASSWORD
2023-09-20T08:43:25.2796970Z ##[debug]loading SECRET_SQL_USERNAME
2023-09-20T08:43:25.2799083Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2023-09-20T08:43:25.2800812Z ##[debug]loading SECRET_TARGETHOSTPASSWORD
2023-09-20T08:43:25.2802663Z ##[debug]loading SECRET_TARGETHOSTUSERNAME
2023-09-20T08:43:25.2804361Z ##[debug]loading SECRET_XLD-SECURITY-USER-PWD
2023-09-20T08:43:25.2805977Z ##[debug]loading SECRET_XLDPRIVATEKEYFILE
2023-09-20T08:43:25.2807709Z ##[debug]loading SECRET_XLRELEASE_TOKEN
2023-09-20T08:43:25.2815874Z ##[debug]loaded 48
2023-09-20T08:43:25.2821095Z ##[debug]Agent.ProxyUrl=undefined
2023-09-20T08:43:25.2822104Z ##[debug]Agent.CAInfo=undefined
2023-09-20T08:43:25.2822726Z ##[debug]Agent.ClientCert=undefined
2023-09-20T08:43:25.2823168Z ##[debug]Agent.SkipCertValidation=undefined
2023-09-20T08:43:25.4845612Z ##[debug]check path : C:\Data\Agent\_work\_tasks\AzureCLI_46e4be58-730b-4389-8a2f-ea10b3e5e815\2.225.0\task.json
2023-09-20T08:43:25.4848746Z ##[debug]adding resource file: C:\Data\Agent\_work\_tasks\AzureCLI_46e4be58-730b-4389-8a2f-ea10b3e5e815\2.225.0\task.json
2023-09-20T08:43:25.4849383Z ##[debug]system.culture=en-US
2023-09-20T08:43:25.4869517Z ##[debug]which 'az'
2023-09-20T08:43:25.5025579Z ##[debug]found: 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd'
2023-09-20T08:43:25.5034507Z ##[debug]scriptType=pscore
2023-09-20T08:43:25.5036227Z ##[debug]scriptLocation=inlineScript
2023-09-20T08:43:25.5036810Z ##[debug]scriptArguments=undefined
2023-09-20T08:43:25.5045270Z ##[debug]powerShellErrorActionPreference=stop
2023-09-20T08:43:25.5046546Z ##[debug]Agent.Version=3.225.0
2023-09-20T08:43:25.5047259Z ##[debug]Agent.TempDirectory=C:\Data\Agent\_work\_temp
2023-09-20T08:43:25.5048883Z ##[debug]scriptPath=C:\Data\Agent\_work\715\s
2023-09-20T08:43:25.5052623Z ##[debug]inlineScript=$azure_tenant_id = $env:tenantId
Write-host "Variable name azure_tenant_id is set with Azure AD Tenant ID"
Write-host "##vso[task.setvariable variable=azure_tenant_id;issecret=true]$azure_tenant_id"

$azure_client_id = $env:servicePrincipalId
Write-host "Variable name azure_client_id is set with resource group SPN Client ID"
Write-host "##vso[task.setvariable variable=azure_client_id;issecret=true]$azure_client_id"

$azure_client_secret = $env:servicePrincipalKey
Write-host "Variable name azure_client_secret is set with resource group SPN credentials"
Write-host "##vso[task.setvariable variable=azure_client_secret;issecret=true]$azure_client_secret"
2023-09-20T08:43:25.5072330Z ##[debug]powerShellIgnoreLASTEXITCODE=false
2023-09-20T08:43:25.5083575Z ##[debug]which 'pwsh'
2023-09-20T08:43:25.5384299Z ##[debug]found: 'C:\Program Files\PowerShell\7\pwsh.exe'
2023-09-20T08:43:25.5385867Z ##[debug]which 'C:\Program Files\PowerShell\7\pwsh.exe'
2023-09-20T08:43:25.5388598Z ##[debug]found: 'C:\Program Files\PowerShell\7\pwsh.exe'
2023-09-20T08:43:25.5390278Z ##[debug]C:\Program Files\PowerShell\7\pwsh.exe arg: -NoLogo
2023-09-20T08:43:25.5391121Z ##[debug]C:\Program Files\PowerShell\7\pwsh.exe arg: -NoProfile
2023-09-20T08:43:25.5391783Z ##[debug]C:\Program Files\PowerShell\7\pwsh.exe arg: -NonInteractive
2023-09-20T08:43:25.5392472Z ##[debug]C:\Program Files\PowerShell\7\pwsh.exe arg: -ExecutionPolicy
2023-09-20T08:43:25.5394230Z ##[debug]C:\Program Files\PowerShell\7\pwsh.exe arg: Unrestricted
2023-09-20T08:43:25.5395448Z ##[debug]C:\Program Files\PowerShell\7\pwsh.exe arg: -Command
2023-09-20T08:43:25.5396497Z ##[debug]C:\Program Files\PowerShell\7\pwsh.exe arg: . 'C:\Data\Agent\_work\_temp\azureclitaskscript1695199405494.ps1'
2023-09-20T08:43:25.5397298Z ##[debug]cwd=C:\Data\Agent\_work\715\s
2023-09-20T08:43:25.5398079Z ##[debug]scriptLocation=inlineScript
2023-09-20T08:43:25.5402800Z ##[debug]failOnStandardError=false
2023-09-20T08:43:25.5406807Z ##[debug]testing directory 'C:\Data\Agent\_work\715\s'
2023-09-20T08:43:25.5435867Z ##[debug]which 'az'
2023-09-20T08:43:25.5629963Z ##[debug]found: 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd'
2023-09-20T08:43:25.5630851Z ##[debug]C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd arg: --version
2023-09-20T08:43:25.5631601Z ##[debug]C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd arg: --version
2023-09-20T08:43:25.5632675Z ##[debug]exec tool: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
2023-09-20T08:43:25.5633596Z ##[debug]exec tool: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
2023-09-20T08:43:25.5634073Z ##[debug]arguments:
2023-09-20T08:43:25.5634443Z ##[debug]arguments:
2023-09-20T08:43:25.5634802Z ##[debug]   --version
2023-09-20T08:43:25.5635154Z ##[debug]   --version
2023-09-20T08:43:25.5638893Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" --version"
2023-09-20T08:43:26.7124323Z azure-cli                         2.52.0
2023-09-20T08:43:26.7124501Z 
2023-09-20T08:43:26.7124725Z core                              2.52.0
2023-09-20T08:43:26.7124959Z telemetry                          1.1.0
2023-09-20T08:43:26.7125061Z 
2023-09-20T08:43:26.7125263Z Extensions:
2023-09-20T08:43:26.7125513Z azure-devops                      0.26.0
2023-09-20T08:43:26.7125609Z 
2023-09-20T08:43:26.7125816Z Dependencies:
2023-09-20T08:43:26.7126066Z msal                            1.24.0b1
2023-09-20T08:43:26.7126297Z azure-mgmt-resource             23.1.0b2
2023-09-20T08:43:26.7126400Z 
2023-09-20T08:43:26.7126681Z Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
2023-09-20T08:43:26.7127039Z Extensions directory 'C:\Program Files\Common Files\AzureCliExtensionDirectory'
2023-09-20T08:43:26.7127175Z 
2023-09-20T08:43:26.7127523Z Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]
2023-09-20T08:43:26.7127701Z 
2023-09-20T08:43:26.7127974Z Legal docs and information: aka.ms/AzureCliLegal
2023-09-20T08:43:26.7128087Z 
2023-09-20T08:43:26.7128160Z 
2023-09-20T08:43:26.7128375Z Your CLI is up-to-date.
2023-09-20T08:43:26.7129260Z ##[debug]useGlobalConfig=true
2023-09-20T08:43:26.7133927Z ##[debug]connectedServiceNameARM=e636603a-3e3b-4322-a62c-e6c580aec420
2023-09-20T08:43:26.7134789Z ##[debug]e636603a-3e3b-4322-a62c-e6c580aec420 data environment = AzureCloud
2023-09-20T08:43:26.7155585Z Setting active cloud to: AzureCloud
2023-09-20T08:43:26.7158379Z ##[debug]which 'az'
2023-09-20T08:43:26.7432617Z ##[debug]found: 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd'
2023-09-20T08:43:26.7433424Z ##[debug]C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd arg: cloud set -n AzureCloud
2023-09-20T08:43:26.7434150Z ##[debug]C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd arg: cloud set -n AzureCloud
2023-09-20T08:43:26.7434874Z ##[debug]exec tool: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
2023-09-20T08:43:26.7435554Z ##[debug]exec tool: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
2023-09-20T08:43:26.7436189Z ##[debug]arguments:
2023-09-20T08:43:26.7436740Z ##[debug]arguments:
2023-09-20T08:43:26.7437328Z ##[debug]   cloud
2023-09-20T08:43:26.7437825Z ##[debug]   cloud
2023-09-20T08:43:26.7438331Z ##[debug]   set
2023-09-20T08:43:26.7438790Z ##[debug]   set
2023-09-20T08:43:26.7439605Z ##[debug]   -n
2023-09-20T08:43:26.7440151Z ##[debug]   -n
2023-09-20T08:43:26.7440698Z ##[debug]   AzureCloud
2023-09-20T08:43:26.7441264Z ##[debug]   AzureCloud
2023-09-20T08:43:26.7441763Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" cloud set -n AzureCloud"
2023-09-20T08:43:27.4574911Z ##[debug]connectedServiceNameARM=e636603a-3e3b-4322-a62c-e6c580aec420
2023-09-20T08:43:27.4581469Z ##[debug]e636603a-xxxx-xxxx-a62c-e6c580aec420 auth scheme = ServicePrincipal
2023-09-20T08:43:27.4582616Z ##[debug]e636603a-xxxx-xxxx-a62c-e6c580aec420 data SubscriptionID = 20a6e158-b302-4b3f-b64b-0657dccdcc0c
2023-09-20T08:43:27.4584883Z ##[debug]e636603a-xxxx-xxxx-a62c-e6c580aec420 auth param authenticationType = spnKey
2023-09-20T08:43:27.4586944Z ##[debug]e636603a-xxxx-xxxx-a62c-e6c580aec420 auth param serviceprincipalid = ***
2023-09-20T08:43:27.4589199Z ##[debug]e636603a-xxxx-xxxx-a62c-e6c580aec420 auth param tenantid = 3a15904d-3fd9-4256-a753-beb05cdf0c6d
2023-09-20T08:43:27.4589934Z ##[debug]key based endpoint
2023-09-20T08:43:27.4591293Z ##[debug]e636603a-xxxx-xxxx-a62c-e6c580aec420 auth param serviceprincipalkey = ***
2023-09-20T08:43:27.4593920Z ##[debug]Processed: ##vso[task.setsecret]***
2023-09-20T08:43:27.4594594Z ##[debug]which 'az'
2023-09-20T08:43:27.4887820Z ##[debug]found: 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd'
2023-09-20T08:43:27.4889320Z ##[debug]C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd arg: login --service-principal -u "***" --password=*** --tenant "3a15904d-3fd9-4256-a753-beb05cdf0c6d" --allow-no-subscriptions
2023-09-20T08:43:27.4890595Z ##[debug]C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd arg: login --service-principal -u "***" --password=*** --tenant "3a15904d-3fd9-4256-a753-beb05cdf0c6d" --allow-no-subscriptions
2023-09-20T08:43:27.4891616Z ##[debug]exec tool: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
2023-09-20T08:43:27.4892456Z ##[debug]exec tool: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
2023-09-20T08:43:27.4893511Z ##[debug]arguments:
2023-09-20T08:43:27.4894226Z ##[debug]arguments:
2023-09-20T08:43:27.4894923Z ##[debug]   login
2023-09-20T08:43:27.4895624Z ##[debug]   login
2023-09-20T08:43:27.4896349Z ##[debug]   --service-principal
2023-09-20T08:43:27.4897038Z ##[debug]   --service-principal
2023-09-20T08:43:27.4897874Z ##[debug]   -u
2023-09-20T08:43:27.4898524Z ##[debug]   -u
2023-09-20T08:43:27.4899203Z ##[debug]   ***
2023-09-20T08:43:27.4899922Z ##[debug]   ***
2023-09-20T08:43:27.4901919Z ##[debug]   --password=***
2023-09-20T08:43:27.4903166Z ##[debug]   --password=***
2023-09-20T08:43:27.4904100Z ##[debug]   --tenant
2023-09-20T08:43:27.4904800Z ##[debug]   --tenant
2023-09-20T08:43:27.4905545Z ##[debug]   3a15904d-xxxx-xxxx-a753-beb05cdf0c6d
2023-09-20T08:43:27.4906869Z ##[debug]   3a15904d-xxxx-xxxx-a753-beb05cdf0c6d
2023-09-20T08:43:27.4907978Z ##[debug]   --allow-no-subscriptions
2023-09-20T08:43:27.4909049Z ##[debug]   --allow-no-subscriptions
2023-09-20T08:43:27.4910402Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" login --service-principal -u *** "--password=***" --tenant 3a15904d-xxxx-xxxx-a753-beb05cdf0c6d --allow-no-subscriptions"
2023-09-20T08:43:29.4740820Z ERROR: Decryption failed: [WinError -2146893813] Key not valid for use in specified state.. App developer may consider this guidance: https://github.com/AzureAD/microsoft-authentication-extensions-for-python/wiki/PersistenceDecryptionError
2023-09-20T08:43:29.4741624Z Please report to us via Github: https://github.com/Azure/azure-cli/issues/20231
2023-09-20T08:43:29.4743707Z ##[error]Error Code: [1]
2023-09-20T08:43:29.4744339Z ##[debug]Processed: ##vso[task.issue type=error;]Error Code: [1]
2023-09-20T08:43:29.4745309Z ##[error]Error: Azure login failed
2023-09-20T08:43:29.4745785Z ##[debug]Processed: ##vso[task.issue type=error;]Error: Azure login failed
2023-09-20T08:43:29.4767564Z ##[debug]task result: Failed
2023-09-20T08:43:29.4769251Z ##[error]Script failed with error: ERROR: Decryption failed: [WinError -2146893813] Key not valid for use in specified state.. App developer may consider this guidance: https://github.com/AzureAD/microsoft-authentication-extensions-for-python/wiki/PersistenceDecryptionError
Please report to us via Github: https://github.com/Azure/azure-cli/issues/20231

2023-09-20T08:43:29.4770415Z ##[debug]Processed: ##vso[task.issue type=error;]Script failed with error: ERROR: Decryption failed: [WinError -2146893813] Key not valid for use in specified state.. App developer may consider this guidance: https://github.com/AzureAD/microsoft-authentication-extensions-for-python/wiki/PersistenceDecryptionError
Please report to us via Github: https://github.com/Azure/azure-cli/issues/20231

2023-09-20T08:43:29.4774188Z ##[debug]Processed: ##vso[task.complete result=Failed;]Script failed with error: ERROR: Decryption failed: [WinError -2146893813] Key not valid for use in specified state.. App developer may consider this guidance: https://github.com/AzureAD/microsoft-authentication-extensions-for-python/wiki/PersistenceDecryptionError
Please report to us via Github: https://github.com/Azure/azure-cli/issues/20231

2023-09-20T08:43:29.4876629Z ##[section]Finishing: Set credentials (RG SPN) for PrivilegedContext

Relevant log output

Not much to saY

Aditional info

yaml task code :
- task: AzureCLI@2
    displayName: 'Set credentials (RG SPN) for PrivilegedContext'
    inputs:
      azureSubscription:  ${{parameters.arm_service_connection}}
      scriptType: 'pscore'
      scriptLocation: 'inlineScript'
      addSpnToEnvironment: true
      useGlobalConfig: true
      inlineScript: |
        $azure_tenant_id = $env:tenantId
        Write-host "Variable name azure_tenant_id is set with Azure AD Tenant ID"
        Write-host "##vso[task.setvariable variable=azure_tenant_id;issecret=true]$azure_tenant_id"

        $azure_client_id = $env:servicePrincipalId
        Write-host "Variable name azure_client_id is set with resource group SPN Client ID"
        Write-host "##vso[task.setvariable variable=azure_client_id;issecret=true]$azure_client_id"

        $azure_client_secret = $env:servicePrincipalKey
        Write-host "Variable name azure_client_secret is set with resource group SPN credentials"
        Write-host "##vso[task.setvariable variable=azure_client_secret;issecret=true]$azure_client_secret"
Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant