Azure / Azure/azure-powershell

login issue using az.accounts 2.1.0

Open
#13,345 3 comments 1 reaction 1 assignee Claimed by @erich-wang View on GitHub
Authentication feature-request MSAL
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

## Description
`Connect-AzAccount` throw error if delete folder "~/.Azure" before run this cmdlet
```
Connect-AzAccount : Could not acquire access to file ~\.Azure\AzureRmContext.json' please try again in a few minutes.
At line:1 char:1
+ Connect-AzAccount
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Connect-AzAccount], UnauthorizedAccessException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
```
## Steps to reproduce

```powershell
disconnect-azaccount
```
delete folder "~/.Azure"

```powershell
connect-azaccount
```

## Environment data

```

```

## Module versions

```powershell

```

## Debug output

```

```

## Error output

```

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.