AppsRegistrations expirations

Show expired apps registrations

Azure do not have a native feature to report on expiring App registrations. The purprose of azure is to provide an automated mechanism of calculating and ingesting the expiration dates into Log Analytics and automatically notify resources when expiration is within threshold.

1. Create and run the RunBook

See the ApplicationsRegistrations.ps1

2. Check the result in logs analytics

alt text

3. Create a schedule

alt text

4. Check the result

The query show the last 25 expirations

NameOfAppsRegistration_CL
| where isnotempty(timestampunix_s)
| project TimeGenerated, DisplayName_s, EndDate_s, StartDate_s, timestampunix_s, datetime_diff('Day', todatetime(EndDate_s), now())
| project-rename Remaining_Days = Column1
| summarize arg_max(TimeGenerated, *) by DisplayName_s
| order by todatetime(EndDate_s) asc
| take 25

5. Display the result in grafana

alt text

Tips to show correctly days in grafana widget:

alt text

Si vous voulez plus d’information sur l’infrastructure vous pouvez voir mon repo à ce sujet : https://github.com/ravindrajob/InfraAtHome