M365: AAD App Secrets Expiring within 30 days
submitted
L
Leland Shane
Looks for applications with expiring/expired secrets (within 30 days), then outputs the Application name, and the secrets associated that are expiring/expired.
Applications[?passwordCredentials[?time_until(endDateTime,
days
) < 30
].endDateTime].['Application Name: 'displayName, 'Secret Name: 'passwordCredentials[?time_until(endDateTime, days
) < 30
].displayName]S
Sam Gold
R
Ricky Kocyigit
The following syntax will add the enddate too :) Applications[?passwordCredentials[?time_until(endDateTime,
days
) < 30
].endDateTime].['Application Name: 'displayName, 'Secret enddate: 'passwordCredentials[].endDateTime, 'Secret Name: 'passwordCredentials[?time_until(endDateTime, days
) < 30
].displayName]