Posts

Showing posts with the label client secret

Generate & Replace an expiring client secret in a SharePoint Add-in

Hi, I have created a provider hosted app for SharePoint. It got expired due to validity of secrete because usually client secret validity is one year. Now the app started throwing exception to me i.e. ""Invalid JWT token. Could not resolve issuer token." I did couple of research on it & found the solution from site "https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/replace-an-expiring-client-secret-in-a-sharepoint-add-in". I have made some changes in this script to make little bit easier to use . Here is the script : #Actual Article #https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/replace-an-expiring-client-secret-in-a-sharepoint-add-in #MSOnline #Get help from : https://www.powershellgallery.com/packages/MSOnline/1.1.166.0 #Inspect #PS> Save-Module -Name MSOnline -Path <path> #Install #PS> Install-Module -Name MSOnline cls #Get app details Connect-MsolService $clientID = “<<YourClientIdGuidHere>>” Write-Host ...