Skip to content

Internal Server Error on service principal credential reset and delete  #29398

Description

@john-pachec0

Describe the bug

When using the az cli, an internal server error is thrown when using az ad sp credential delete --id xxxxx --key-id xxxxx --verbose and az ad sp credential reset --id xxxxx

Related command

az ad sp credential delete, az ad sp credential reset

Errors

Encountered an internal server error.

Issue script & Debug output

urllib3.connectionpool: Starting new HTTPS connection (1): graph.microsoft.com:443
urllib3.connectionpool: [https://graph.microsoft.com:443](https://graph.microsoft.com/) "POST /v1.0/servicePrincipals/xxxxx/removePassword HTTP/1.1" 500 None
cli.azure.cli.core.util: Response status: 500
cli.azure.cli.core.util: Response headers:
cli.azure.cli.core.util:     'Cache-Control': 'no-cache'
cli.azure.cli.core.util:     'Transfer-Encoding': 'chunked'
cli.azure.cli.core.util:     'Content-Type': 'application/json'
cli.azure.cli.core.util:     'Content-Encoding': 'gzip'
cli.azure.cli.core.util:     'Vary': 'Accept-Encoding'
cli.azure.cli.core.util:     'Strict-Transport-Security': 'max-age=31536000'
cli.azure.cli.core.util:     'request-id': 'xxxxx'
cli.azure.cli.core.util:     'client-request-id': 'xxxxx'
cli.azure.cli.core.util:     'x-ms-ags-diagnostic': '{"ServerInfo":{"DataCenter":"North Central US","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"CH01EPF0002DB15"}}'
cli.azure.cli.core.util:     'x-ms-resource-unit': '1'
cli.azure.cli.core.util:     'Date': 'Tue, 16 Jul 2024 12:33:03 GMT'
cli.azure.cli.core.util: Response content:
cli.azure.cli.core.util: {"error":{"code":"Service_InternalServerError","message":"Encountered an internal server error.","innerError":{"date":"2024-07-16T12:33:03","request-id":"xxxxx","client-request-id":"xxxxx"}}}

Expected behavior

When a user has the proper permissions to delete or reset the credentials on a service principal, they would be able to do this without encountering an internal server error.

Environment Summary

azure-cli 2.62.0

core 2.62.0
telemetry 1.1.0

Extensions:
account 0.2.5
aks-preview 0.5.174
kusto 0.5.0

Dependencies:
msal 1.28.1
azure-mgmt-resource 23.1.1

Python location '/usr/local/Cellar/azure-cli/2.62.0/libexec/bin/python'
Extensions directory '/Users/jpacheco/.azure/cliextensions'

Python (Darwin) 3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

This occurred for all team members who attempted to delete or reset credentials.

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamGraph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adPossible-SolutionSimilar-Issueact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions