Skip to content

az ad sp credential reset doesn't reset service principal credential, resets app credential #11458

Description

@mikeliddle

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug
We have a multi-tenant app registration defined in Azure. We create a service principal in a separate tenant for that app, but when we try to provide a credential using the az ad sp credential reset command it tries to look up the app resource and can't find it in the tenant (because it isn't there). Why doesn't it look up the service principal resource like the corresponding powershell command?

To Reproduce

> az ad sp create --id <app_id>
> az ad sp credential reset -n <app_id> --append
Resource '<app_id>' does not exist or one of its queried reference-property objects are not present.

Expected behavior
Similar behavior to the powershell command provided, the service principal should receive a new credential, which will be returned by the command, or provided by the user using the --password parameter.

Environment summary
cmd.exe on windows

> az --version
azure-cli                         2.0.75 *

command-modules-nspkg              2.0.3
core                              2.0.75 *
nspkg                              3.0.4
telemetry                          1.0.4

Additional context
The documentation clearly states that this command operates the same as az ad app credential, but the reset command says it resets the service principal's credential. Is there actually a way to reset the service principal's credentials using azure cli?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions