Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.24k stars 3.84k forks source link

sudo (install Az) creates user .Azure directory which user can't access #9078

Open johncrim opened 5 years ago

johncrim commented 5 years ago

Description

Installing the Az module on Linux within sudo (to complete a global install) creates an ~user/.Azure directory owned by root. Subsequently the user account cannot access files in the directory, causing errors connecting to Azure.

This problem did not exist before 4/8. I suspect that a new version of Az was released on 4/8, causing this regression.

I have provided complete details on my problem, with repro steps, here: https://developercommunity.visualstudio.com/content/problem/523218/azure-powershell-script-new-error-there-was-an-err.html

Steps to reproduce

This bug originally bit me while installing Az on an Ubuntu 16.04 build agent in Azure DevOps, though I would expect this issue to affect all Linux users.

To install Az on an Ubuntu 16.04 build agent, I use the bash command:

sudo /usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '$(Build.Repository.LocalPath)/build/install-az-modules.ps1'

The build/install-az-modules.ps1 script is:

<#
.SYNOPSIS
    Build agent script to install Az Powershell modules. This script should be run as sudo.

    On a linux build agent, this command can be run as:
    sudo /usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '$(Build.Repository.LocalPath)/build/install-az-modules.ps1'
#>

# Disable status info to clean up build agent stdout
$global:ProgressPreference = 'SilentlyContinue'
$global:VerbosePreference = "SilentlyContinue"

$azureRmModule = Get-InstalledModule AzureRM -ErrorAction SilentlyContinue
if ($azureRmModule) {
  Write-Host 'AzureRM module exists. Removing it'
  Uninstall-Module -Name AzureRM -AllVersions
  Write-Host 'AzureRM module removed'
}

Write-Host '##[section]Installing Az module...'
Install-Module Az -Force -AllowClobber

if (Get-Command Uninstall-AzureRm -ErrorAction SilentlyContinue) {
  Write-Host 'Running Uninstall-AzureRm...'
  Uninstall-AzureRm
}

After running this script (again, within sudo - I'm not aware of a better way to install Az globally, and remove AzureRm globally), the following command fails:

PS> Connect-AzAccount (valid connect params)
Connect-AzAccount : Access to the path '/home/vsts/.Azure/AzureRmContext.json' is denied.
At /home/vsts/work/_temp/f5c95a72-dda3-4178-babd-7a26eef54735.ps1:5 char:1
+ Connect-AzAccount -ServicePrincipal -TenantId  edb5bc34-4649-4523-84b ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [Connect-AzAccount], UnauthorizedAccessException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

Environment data

Name                           Value
----                           -----
PSVersion                      6.2.0
PSEdition                      Core
GitCommitId                    6.2.0
OS                             Linux 4.15.0-1041-azure #45-Ubuntu SMP Fri Mar …
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

   Directory: /home/vsts/.local/share/powershell/Modules

ModuleType Version    Name                                PSEdition ExportedCom
                                                                    mands
---------- -------    ----                                --------- -----------
Script     1.5.1      Az.Accounts                         Core,Desk {Disable-A…
Script     1.0.1      Az.Aks                              Core,Desk {Get-AzAks…
Script     1.1.0      Az.AnalysisServices                 Core,Desk {Resume-Az…
Script     1.0.0      Az.ApiManagement                    Core,Desk {Add-AzApi…
Script     1.0.0      Az.ApplicationInsights              Core,Desk {Get-AzApp…
Script     1.2.1      Az.Automation                       Core,Desk {Get-AzAut…
Script     1.1.0      Az.Batch                            Core,Desk {Remove-Az…
Script     1.0.0      Az.Billing                          Core,Desk {Get-AzBil…
Script     1.2.0      Az.Cdn                              Core,Desk {Get-AzCdn…
Script     1.1.0      Az.CognitiveServices                Core,Desk {Get-AzCog…
Script     1.8.0      Az.Compute                          Core,Desk {Remove-Az…
Script     1.0.1      Az.ContainerInstance                Core,Desk {New-AzCon…
Script     1.0.1      Az.ContainerRegistry                Core,Desk {New-AzCon…
Script     1.1.1      Az.DataFactory                      Core,Desk {Set-AzDat…
Script     1.0.0      Az.DataLakeAnalytics                Core,Desk {Get-AzDat…
Script     1.2.0      Az.DataLakeStore                    Core,Desk {Get-AzDat…
Script     1.0.0      Az.DevTestLabs                      Core,Desk {Get-AzDtl…
Script     1.0.0      Az.Dns                              Core,Desk {Get-AzDns…
Script     1.1.1      Az.EventGrid                        Core,Desk {New-AzEve…
Script     1.1.0      Az.EventHub                         Core,Desk {New-AzEve…
Script     1.1.0      Az.HDInsight                        Core,Desk {Get-AzHDI…
Script     1.1.0      Az.IotHub                           Core,Desk {Add-AzIot…
Script     1.2.0      Az.KeyVault                         Core,Desk {Add-AzKey…
Script     1.2.1      Az.LogicApp                         Core,Desk {Get-AzInt…
Script     1.1.0      Az.MachineLearning                  Core,Desk {Move-AzMl…
Script     1.0.0      Az.MarketplaceOrdering              Core,Desk {Get-AzMar…
Script     1.1.0      Az.Media                            Core,Desk {Sync-AzMe…
Script     1.1.0      Az.Monitor                          Core,Desk {Get-AzMet…
Script     1.7.0      Az.Network                          Core,Desk {Add-AzApp…
Script     1.1.0      Az.NotificationHubs                 Core,Desk {Get-AzNot…
Script     1.2.0      Az.OperationalInsights              Core,Desk {New-AzOpe…
Script     1.0.0      Az.PolicyInsights                   Core,Desk {Get-AzPol…
Script     1.1.0      Az.PowerBIEmbedded                  Core,Desk {Remove-Az…
Script     1.3.0      Az.RecoveryServices                 Core,Desk {Get-AzRec…
Script     1.1.0      Az.RedisCache                       Core,Desk {Remove-Az…
Script     1.0.0      Az.Relay                            Core,Desk {New-AzRel…
Script     1.3.1      Az.Resources                        Core,Desk {Get-AzPro…
Script     1.0.0      Az.ServiceBus                       Core,Desk {New-AzSer…
Script     1.0.1      Az.ServiceFabric                    Core,Desk {Add-AzSer…
Script     1.0.2      Az.SignalR                          Core,Desk {New-AzSig…
Script     1.9.0      Az.Sql                              Core,Desk {Get-AzSql…
Script     1.2.0      Az.Storage                          Core,Desk {Get-AzSto…
Script     1.0.0      Az.StreamAnalytics                  Core,Desk {Get-AzStr…
Script     1.0.1      Az.TrafficManager                   Core,Desk {Add-AzTra…
Script     1.2.0      Az.Websites                         Core,Desk {Get-AzApp…

Debug output

##[command]Connect-AzAccount (args)
DEBUG: 8:40:17 PM - ConnectAzureRmAccountCommand begin processing with ParameterSet 'ServicePrincipalCertificateWithSubscriptionId'.
DEBUG: 8:40:17 PM - Autosave setting from startup session: 'CurrentUser'
DEBUG: 8:40:17 PM - No autosave setting detected in environment variable 'AzContextAutoSave'. 
DEBUG: 8:40:17 PM - Using Autosave scope 'CurrentUser'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: 'edb5bc34-4649-4523-84bb-e974adad42ec', Endpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [ADAL]: Information: 2019-04-24T20:40:17.7401267Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: ADAL PCL.CoreCLR with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...

DEBUG: [ADAL]: Information: 2019-04-24T20:40:17.7412832Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: === Token Acquisition started: 
    CacheType: null
    Authentication Target: Client
    , Authority Host: login.microsoftonline.com

DEBUG: [ADAL]: Verbose: 2019-04-24T20:40:18.3329526Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: Loading from cache.

DEBUG: [ADAL]: Verbose: 2019-04-24T20:40:18.3427860Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Information: 2019-04-24T20:40:18.3502347Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: No matching token was found in the cache

DEBUG: [ADAL]: Verbose: 2019-04-24T20:40:18.3505894Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Information: 2019-04-24T20:40:18.3509554Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: No matching token was found in the cache

DEBUG: [ADAL]: Verbose: 2019-04-24T20:40:18.3513003Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Information: 2019-04-24T20:40:18.3516026Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: No matching token was found in the cache

DEBUG: [ADAL]: Verbose: 2019-04-24T20:40:18.3519131Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Information: 2019-04-24T20:40:18.3522751Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: No matching token was found in the cache

DEBUG: [ADAL]: Verbose: 2019-04-24T20:40:18.3526251Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Information: 2019-04-24T20:40:18.3530887Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: No matching token was found in the cache

DEBUG: [ADAL]: Verbose: 2019-04-24T20:40:18.3534393Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Information: 2019-04-24T20:40:18.3537700Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: No matching token was found in the cache

DEBUG: [ADAL]: Verbose: 2019-04-24T20:40:18.6168753Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: Storing token in the cache...

DEBUG: [ADAL]: Verbose: 2019-04-24T20:40:18.6179255Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: An item was stored in the cache

DEBUG: [ADAL]: Information: 2019-04-24T20:40:18.6192248Z: 9dc1a508-38af-4c72-8627-220c3baefb5b - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 4/24/19 9:40:18 PM +00:00

DEBUG: [ADAL]: Information: 2019-04-24T20:40:18.6194496Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Serializing token cache with 1 items.

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions?api-version=2016-06-01

Headers:
x-ms-client-request-id        : 87a31554-82d5-44eb-9987-fda27b764e93
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-tenant-reads: 11999
x-ms-request-id               : fae216fa-0bc5-4c18-b780-97f442271d28
x-ms-correlation-request-id   : fae216fa-0bc5-4c18-b780-97f442271d28
x-ms-routing-request-id       : WESTUS2:20190424T204019Z:fae216fa-0bc5-4c18-b780-97f442271d28
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Wed, 24 Apr 2019 20:40:18 GMT

Body:
{
  "value": [
    {
      "id": "/subscriptions/???",
      "subscriptionId": "???",
      "displayName": "Visual Studio Enterprise",
      "state": "Enabled",
      "subscriptionPolicies": {
        "locationPlacementId": "Public_2014-09-01",
        "quotaId": "MSDN_2014-09-01",
        "spendingLimit": "On"
      },
      "authorizationSource": "RoleBased"
    }
  ]
}

Connect-AzAccount : Access to the path '/home/vsts/.Azure/AzureRmContext.json' is denied.
At /home/vsts/work/_temp/273d11e7-8f56-45dd-82f1-19513d425467.ps1:9 char:1
+ Connect-AzAccount -ServicePrincipal -TenantId  ??? ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [Connect-AzAccount], UnauthorizedAccessException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

DEBUG: AzureQoSEvent: CommandName - Connect-AzAccount; IsSuccess - False; Duration - 00:00:01.2534094; Exception - System.UnauthorizedAccessException: Access to the path '/home/vsts/.Azure/AzureRmContext.json' is denied. ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
   at Microsoft.Azure.Commands.Common.Authentication.Abstractions.DiskDataStore.OpenForExclusiveWrite(String path)
   at Microsoft.Azure.Commands.Common.Authentication.ResourceManager.ProtectedFileProvider.ExclusiveWriteFileProvider.AcquireLock(String filePath)
   at Microsoft.Azure.Commands.Common.Authentication.ResourceManager.ProtectedFileProvider.TryGetStreamLock(Func`2 acquireLock, String filePath, Stream& stream)
   at Microsoft.Azure.Commands.Common.Authentication.ResourceManager.ProtectedFileProvider.InitializeStream()
   at Microsoft.Azure.Commands.Common.Authentication.ResourceManager.ProtectedFileProvider.get_Stream()
   at Microsoft.Azure.Commands.Common.Authentication.ResourceManager.ProtectedFileProvider.CreateReader()
   at Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile.Load(IFileProvider provider)
   at Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile..ctor(IFileProvider provider)
   at Microsoft.Azure.Commands.Common.Authentication.ResourceManager.AzureRmAutosaveProfile.get_DefaultProfile()
   at Microsoft.Azure.Commands.Common.Authentication.ResourceManager.AzureRmAutosaveProfile.TrySetDefaultContext(IAzureContext context)
   at Microsoft.Azure.Commands.Common.Authentication.ResourceManager.AzureRmAutosaveProfile.TrySetDefaultContext(String name, IAzureContext context)
   at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account, IAzureEnvironment environment, String tenantId, String subscriptionId, String subscriptionName, SecureString password, Boolean skipValidation, Action`1 promptAction, String name, Boolean shouldPopulateContextList)
   at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass92_0.<ExecuteCmdlet>b__0(AzureRmProfile localProfile, RMProfileClient profileClient, String name)
   at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass94_0.<SetContextWithOverwritePrompt>b__0(AzureRmProfile prof, RMProfileClient client)
   at Microsoft.Azure.Commands.Profile.Common.AzureContextModificationCmdlet.ModifyContext(Action`2 contextAction)
   at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.SetContextWithOverwritePrompt(Action`3 setContextAction)
   at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.ExecuteCmdlet()
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronouslyOrAsJob>b__3_0(T c)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 8:42:30 PM - ConnectAzureRmAccountCommand end processing.
DEBUG: 8:42:30 PM - ConnectAzureRmAccountCommand end processing.

Workaround

The workaround is to delete the ~user/.Azure directory after installing the Az module, eg:

sudo rm -rf ~/.Azure

After doing this, the directory is properly recreated after running Az commands as user.

However, it's still a bug (and a new bug) that root owns ~user/.Azure after the install.

markcowl commented 5 years ago

Module installation wouldn't cause this to happen, but module loading might, as there are some checks of the .Azure folder in the psm1 script for the module (so likely, this occurs in Get-Command Uninstall-AzureRm).

johncrim commented 5 years ago

@markcowl - that makes sense. I suppose I could skip the Uninstall-AzureRm command, but it seems to be recommended to remove AzureRm if using Az.

markcowl commented 5 years ago

@johncrim yeah, but you shouldn't have AzureRM in linux in any case. either that, or change the permissions on the directory.

There are two ways I can think of for us to fix this, both of which we should do,

1- Update the module load script to not create this folder if it doesn't exist 2- Update our context load to print a warning when this error occurs and default to session-based auth

markcowl commented 5 years ago

Description

Resolve issues with loading the module when the user does not have access to the .Azure directory

Cost: 4

SplitThePotCyrus commented 5 years ago

We are experiencing similar issue, however we did not issue any Uninstall-AzureRm command and still got the ~/.Azure directory just by doing Install-Module Az -Force -AllowClobber

The solution that @johncrim provided did not solve our issue.

After tampering with _work/_tasks/AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62/4.0.7/InitializeAz.ps1 we found out that our $endpointObject.authenticationType == null, but $endpointObject.applicationTokenCredentials.authType == "spnKey" so we modified as stated below for now until this is fixed in the lib.

if ($endpointObject.scheme -eq 'ServicePrincipal') {
    try {
        if ($endpointObject.authenticationType -ieq 'SPNKey' -Or $endpointObject.applicationTokenCredentials.authType -ieq 'spnKey') {
            $psCredential = New-Object System.Management.Automation.PSCredential($endpointObject.servicePrincipalClientID, (ConvertTo-SecureString $endpointObject.servicePrincipalKey -AsPlainText -Force))
            Write-Host "##[command]Connect-AzAccount -ServicePrincipal -Tenant $($endpointObject.tenantId) -Credential $psCredential -Environment $environmentName"
...

let me know ff there is any information or detail I can provide to help the team figure this out.

EDIT: Of course, directly after writing this, karma bit me as now there was a new version of the task on path _work/_tasks/AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62/4.0.8/InitializeAz.ps1, which meant I have to reapply the fix to keep the pipeline moving 😸

EDIT2: As it turns out, our main issue was due to an old "Service Connection" from Azure DevOps to Azure Cloud. Updating the service connection solved our issue. But the fact remains that ~/.Azure folder gets created by just installing the Az module. Not that it bothers us at the moment.

markcowl commented 5 years ago

@SplitThePotCyrus So, I think you are referring to ADO installtion, instead of Install-Module installation. I still think in this case the root cause is the same.

johncrim commented 5 years ago

@markcowl : Apologies for the super-tardy reply on this:

@johncrim yeah, but you shouldn't have AzureRM in linux in any case. either that, or change the permissions on the directory.

AzureRM is (or was, when I created this issue) installed on the Azure DevOps Ubuntu 16.04 agent image. The only way to use Az commands in builds/deploys was to install it from bash.

I think the key fix that I'm looking for is that this directory should not be created within a non-root user's home directory, while running as root. If a directory is created for the root user's session info, and file permissions are limited to root user access only, it should be /home/root/.Azure, not /home/(other user)/.Azure.

erich-wang commented 5 years ago

@wyunchi-ms, could you follow this issue?

wyunchi-ms commented 5 years ago

Hi @johncrim. We didn't recurrence your problem on both ubuntu 16.04, ubuntu 18.04 and wsl. Are you use sudo instead of login as root? When you are using sudo, you are still the user who login so the home directory will not be /root or /home/root. But the permission of dir will be root. I'm not sure whether this can solve your problem.

johncrim commented 5 years ago

Yes, I'm using sudo. The bug I'm reporting is using sudo, not su - see the issue title.

This is a build script (running in an Azure devops agent). Using sudo is a standard use-case, b/c it's a bad practice to give everyone the root password. In this case I technically could login as root using sudo su -, but I shouldn't have to add that level of indirection to not leave the user directory in a bad state, and the Azure module unusable.

Again, the directory should not be created as root-owned, in a non-root user directory. That's the nasty side-effect that should not occur when the module is installed.

I reported this to save other users, and Microsoft support people, the hassle of figuring it out. This is basic "how things should work on Linux" behavior.

wyunchi-ms commented 4 years ago

Hi @johncrim we will try to fix this issue. The cause of this issue is that the method OnImport which will be invoked when cmdlet is imported will check the .Azure folder and create it if it's not exist. There are two ways to fix this.

  1. Make cmdlet act as what the environment variable ` set. This is the most reasonable way. ButOnImportis used by all the cmdlets inAzAccount` module this will affect a lot of cmdlets and will cost many time to refact the code.
  2. Make the cmdlets like Uninstall-AzureRm follow another OnImport method which will not create .Azure folder. This will cost less but a little ugly. We will discus this in the meeting.
20shivangi commented 4 years ago

@wyunchi-ms We are still facing this issue, even on MAC machine in hosted agent : https://github.com/microsoft/azure-pipelines-tasks/issues/12030

Can you provide some ETA when this will be fixed ?

wyunchi-ms commented 4 years ago

Hi @20shivangi , we will try to fix this. Before we fix this issue, can you use the workaround to pass this first? The workaround is to delete the directory /{username}/.Azure whoes owner is root or create /{username}/.Azure with current user permission at the beginning of pipeline?

20shivangi commented 4 years ago

@wyunchi-ms Is the issue fixed ? Please let us know once the issue is fixed.

darkweb-123 commented 4 years ago

is there any solution , im facing the same issue on a powershell docker container

daveneeley commented 4 years ago

https://github.com/PowerShell/PowerShell/issues/5239

20shivangi commented 4 years ago

@wyunchi-ms Is the issue fixed ?