Azure / Azure/azure-devops-cli-extension
Az pipeline create command does not work with login using Service Principal or PAT Token in Azure Pipelines
- Dominant language
- Python
- Stars
- 682
- Forks
- 278
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 3
Description
**Describe the bug**
"az pipeline create" command does not work with az login using Service Principal or PAT Token. User Authentication is required for creation of this resource using Azure Pipeline.
However, if we try to do user authentication in Azure pipeline, it is also supported
"az login -u <> -p <>" use in azure pipeline gives below error.
"Logging in through command line is not supported. For cross-check, try 'az login' to authenticate through browser."
**To Reproduce**
Azure Cli Version: Powershell task in Azure Pipeline
Use az --version
Look for something like-
azure-cli (2.0.70)
Azure-Devops extension version: 0.18.0
Use az --version
Look for something like-
Extensions:
azure-devops (0.18.0)
Steps to reproduce the behavior:
1. login using az login -u <> -p <> in Azure Pipelines
2. setup defaults..
3. Run command.... "az pipelines create --name "" --description "" --repository <> --repository-type tfsgit --branch master --yml-path <>"
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
The azure devops pipeline should get created using Service Prinicpal or PAT token authentication
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Debug logs**
Add the output of the command running it with debug mode (--debug)
2020-05-06T17:19:23.3670636Z Logging in through command line is not supported. For cross-check, try 'az login' to authenticate through browser.
2020-05-06T17:19:25.4113305Z Extension 'azure-devops' is already installed.
2020-05-06T17:19:29.3636841Z This command is in preview. It may be changed/removed in a future release.
2020-05-06T17:19:30.4908067Z The requested resource requires user authentication: https://dev.azure.com/XXXXXXXXXXX/c9d62b77-2134-480b-a41f-e60c78cd23dc/_apis/distributedtask/queues
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.