Azure / Azure/azure-cli

Cannot login with Service Principal secret on Azure Stack Hub

Open
#20,403 2 comments 3 reactions 1 assignee Claimed by @jiasli View on GitHub
Account act-identity-squad feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
When I try to login to the Azure Stack Hub Tenant ARM endpoint using version 2.30.0 of the CLI I get this error:

```
MSIS9605: The client is not allowed to access the requested resource.
To re-authenticate, please run:
az login
```

This only happens with the ADFS identity system.

This worked fine with version 2.29

**To Reproduce**
Run this command:

```
az login --tenant ' -u '' -p '' --service-principal -o table
```

**Expected behavior**
Azure CLI should log in correctly

**Environment summary**

- Azure CLI on windows using `.msi` and version 2.30.0
- Azure Stack Hub using ADFS
- hybrid profile `2020-09-01-hybrid`

**Additional context**

I can log in using powershell with the same service principal secret that fails with Azure CLI

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.