Blog Post
Use Azure Logic Apps to Notify of Pending AAD Application Client Secrets and Certificate Expirations
EPfaffinger Thanks, for your reply anyway. As these things often happen, I wasn't given much time to celebrate before my boss said 'erm...this is really nice but can you make it so that the output sorts the result by those secrets that are expiring first? 🙄
So that's what I'm tying to do now..
NigelB18 asked the question on this forum and the OP Russ_Rimmerman responded....
yes that should be doable. In general, I think I would try adding an $orderby= to the Initialize Nextlink variable step that stores the graph api query to order by the passwordCredentials/items/endDateTime and keyCredentials/items/endDateTime.
https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#odata-system-query-options
https://devblogs.microsoft.com/microsoft365dev/build-advanced-queries-with-count-filter-search-and-orderby/
however, me not being very skilled at code, I'm stuck here.
I've tried adding these lines to the initialize - NextLink step
like this: adding the &$orderby= passwordCredentials/items/endDateTime
https://graph.microsoft.com/v1.0/applications?$select=id,appId,displayName,passwordCredentials,keyCredentials&$top=999&$orderby= passwordCredentials/items/endDateTime
&$orderby=
It hasn't worked so far