One of the benefits of Office 365's Incoming Webhook feature is the ability to send notifications about systems/processes in your organization. And, since both Groups and Teams have a common webhook implementation, you can use either in your integrations. (User choice FTW!)
One scenario that I have come across repeatedly is the expiration of Azure AD secrets. These secrets are used in two different ways:
- Keys in application registrations (aka App Secret or Client Secret)
- Service Principal credentials (typically created via appregnew.aspx for SharePoint Add-Ins)
When App registrations first became available, the maximum age of credentials was two years. Similarly, credentials for Add-Ins expire after two years. Obviously, an adminstrator must get involved before the expiration, but there are many very busy admins who forget.
The SharePoint PnP group has a web application that will show all applications and service principals in a tenant. This Tenant Information Portal is very helpful, but requires the administrators to visit the portal to see the information.
Having a push notification can be very helpful in this scenario. I extended the PnP solution to include a WebJob that will using the Incoming Webhook feature of Groups/Teams to create a connector card that lists expired and soon-to-expire items.
As with all PnP samples, the source code is included in the repository so it can be customized to fit your environment. I encourage you to pull it down and get it running. Any feedback is encouraged, using the issues list in the GitHub repo.