Azure / Azure/azure-cli

How to generate cert for test use

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

Description

version
{
"azure-cli": "2.31.0",
"azure-cli-core": "2.31.0",
"azure-cli-telemetry": "1.0.6"
}

**Describe the bug**
I follow the doc https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal to generate a certificate for service principal. I only can export cer and pfx from ```certmgr```. And I upload the cer to the service principal. Because ```az-cli``` does not support pfx to login service principal. So I use ```openssl pkcs12 -in 2.pfx -out 3.pem -nodes``` to convert pfx to pem. But when I login by using this pem, I get error as below.
AADSTS7000215: Invalid client secret is provided.
Trace ID: f0ac8dc9-8841-4a44-a9a3-2882efa90600
Correlation ID: 31d07a43-b82b-4f49-a2ef-e05245d1dc68
![image](https://user-images.githubusercontent.com/13211513/144961462-d7bd5daf-61ff-4ada-ae3d-e5ee8f88859b.png)

Do you have any idea about how to generate certificate for self test?

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.