Skip to content

Incorrect command to check SP expiration Date #4153

@manasij12

Description

@manasij12

The documentation at
Rotate service principal credentials for your Azure Red Hat OpenShift (ARO) Cluster

Mentions about dealing with Microsoft Entra Service Principals :
Generate a new secure secret for the service principal
SP_SECRET=$(az ad sp credential reset --id $SP_ID --query password -o tsv)

But to check expiry date :
Use az ad ap cred list
az ad app credential list --id $SP_ID --query "[].endDateTime" -o tsv

Instead it needs to be :
az ad sp credential list --id $SP_ID --query "[].endDateTime" -o tsv

I had an issue where customer had Microsoft Entra APP registration with but APP object and SP object and this command cause a lot of confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions