12,374 total views, 3 views today
Invalid issuer or signature – sometimes, we get the error “[SecurityTokenException: Invalid issuer or signature.]” in SharePoint online provider hosted app. In this troubleshooting technique, we will see how to fix the “SecurityTokenException: Invalid issuer or signature.” error in the SharePoint Online office 365.
Scenario: Invalid issuer or signature
Let’s say we have a provider-hosted app running in Share Point Online which connects to Azure WebApp Service. The app might work fine for the time being and later on, it might start to fail after some time with the following error.
[SecurityTokenException: Invalid issuer or signature.]
Possible Reason for being the above error – Invalid issuer or signature
If you deploy the app from the development environment to the production but forget to correct the Client Id and Client Secret to the values that had previously been generated for production. This means that when the user is redirected to the production azure website the client details in SharePoint Online, in this case from the development environment, will not match with the already configured keys in the associated Azure website and the end result might be the above error.
Solution: Invalid issuer or signature
Go to the visual studio solution and correct the Client Id/Secret in the web.config file and the publishing profile and finally deploy a new version of the app component – the issue should be resolved.
See Also: Invalid issuer or signature
You may also like the below SharePoint troubleshooting articles:
- [Fixed]: How to fix No gulpfile found in SPFx framework project
- [Fixed] Error – activate the SharePoint Server Publishing Infrastructure feature in SharePoint Online site
- [Fixed] Server relative urls must start with SPWeb.ServerRelativeUrl”in reading web part properties!
- [Fixed]: The page could not be created. Custom Scripting might be deactivated on the destination site or you might not have sufficient permissions.
- [Fixed] The upgraded database schema doesn’t match the TargetSchema(Failed to upgrade SharePoint Products)
- [Fixed] “Sorry, something went wrong. There was an exception in the Database” (SharePoint Server Error)
- [Fixed] How to fix the “Unexpected response from server. The status code of response is ‘500’ in SharePoint 2016 Search error.”?
- [Fixed] How to fix the wrong tenant credential error in SharePoint online?
- [Fixed] How to fix request timed out error in SharePoint 2016 search (There was no endpoint listening)?
- [Fixed] How to Fix a SharePoint 404 Error in sub site After Restoring a Content Database?
- [SecurityTokenException: Invalid issuer or signature.]