I am managing a Provider-Hosted SharePoint App/Add-in and the Client Secret that we use to authenticate with SharePoint is due for expiration soon. 3 years ago, when the previous Client Secret was about to expire, we created a new one using the process documented here: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/replace-an-expiring-client-secret-in-a-sharepoint-add-in However, when the original Secret expired, the site went down, because the new Secret was not working for some unknown reason. We created a new Secret and waited 24 hours for it to propagate before the site resumed working.
In order to avoid an outage this time, I'd like to somehow validate that the new Secret is working before the old one expires. Problem is, according to the documentation and my personal experience:
- The new Client Secret will not be valid/usable for 24 hours, because it must be propagated to SPO
- The new Client Secret cannot be used until the old Client Secret has expired.
So if I create a new Client Secret, I have to wait until the old one expires to see if it is working and if I need to create a 2nd new Client Secret, I will have to wait an additional 24 hours to see if that works.
So how can I get a new Secret set up without risking a 24 hour or longer outage?