I am trying to get reports for expiry date of Azure AD SPN credentials using Az cli.
I am able to get reports using Az cli "az ad sp credential list" but stuck with date conversion.
az ad sp credential list --id xxxxxx-xxx-xxx-xx --query '[].{Key:customKeyIdentifier,expirydate:endDate}' -o table
output:
Expirydate Key
-------------------------------- ---------------
2299-12-30T23:00:00+00:00 Test
2020-01-10T13:13:12.647000+00:00 Qa
2299-12-30T16:00:00+00:00 Dev
is there a way to convert the expiry date output to standard date
i.e 2299-12-30T23:00:00+00:00 -> 30-12-2299
Any suggestion? Thanks in advance.