Skip to content

Facing issue connecting azure using service principle over Azure CLI while works with Powershell #31980

@AnilJujjuri007

Description

@AnilJujjuri007

Describe the bug

Facing issuing using it over Azure CLI
az login --service-principal -u <APP_ID> -p <CLIENT_SECRET> --tenant <TENANT_ID>

Works with Powershell

$credentials = Get-Credential
Connect-AzAccount -ServicePrincipal -Credential $credentials -Tenant

Related command

az login --service-principal -u <APP_ID> -p <CLIENT_SECRET> --tenant <TENANT_ID> by using the facing issue that app is not under subscription even everything in the right manner.

Errors

No subscription found for mentioned app

Issue script & Debug output

az account clear
az identity list

Expected behavior

should be worked but not

Environment Summary

azure-cli 2.76.0

core 2.76.0
telemetry 1.1.0

Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0

Python location '/opt/az/bin/python3'
Config directory '/home/edgedevice/.azure'
Extensions directory '/home/edgedevice/.azure/cliextensions'

Python (Linux) 3.12.10 (main, Jul 29 2025, 09:26:29) [GCC 11.4.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAccountaz login/accountAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamManaged IdentityFor `az identity` onlyOKR CandidateThis label is used to track how many GitHub issues we have resolved for OKR purpose.Possible-SolutionSimilar-Issuecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-author-feedbackMore information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions