Generate a New Client ID and Client Secret
This guide will walk you through how to generate a new Wizdom app with associated client id, and client secret if the client secret has expired.
Expired Client Secret
1) In Wizdom Configuration Center, you will be met by the following error message.
Prerequisites
1) Microsoft Online Services Sign-In Assistant will have to be installed on the development computer. Download it here (32bit or 64bit)
2) SharePoint Online Management Shell will have to be installed on the development computer. Download it here
3) A tenant administrator user for the Office 365 tenant.
1) Generate New Client ID and Client Secret
1) Go to the root site collection where the current app is installed and navigate to: https://<tenantsiteURL>.sharepoint.com/_layouts/15/appregnew.aspx or if using managed path for Wizdom, go to https://<tenantsiteURL>.sharepoint.com/sites/<wizdom>/_layouts/15/appregnew.aspx
2) Click generate for both the ‘Client id’ and ‘Client Secret’.
3) Fill in the ‘Title’ of the app. You decide the name, e.g. you can call it Wizdom.
4) In the ‘App Domain’ field’, you fill in the app domain name, typically ‘nameofyourorganization.azurewebsites.net’.
5) In the ‘Redirect URL’ field you, fill in the URL of the Wizdom app domain. Remember to use ‘https://’ before the URL, e.g. ‘https://nameofyourorganization.azurewebsites.net’.
2) Update the New Client ID and Secret in Azure
1) Go to https://portal.azure.com/ and log in to find the Wizdom Azure website. If you have more than one Wizdom app, you’ll need to find the Wizdom Azure website with the same URL that you filled in the ‘Redirect URL’ field in step 1.5.
2) Go to ‘Applications settings’.
3) Replace the client id and client secret with the new values generated in step 1 and click ‘Save’. (as a precautionary measure, you can copy the old client id and secret to Notepad, before you replace them).
3) Delete the Old App from the Intranet and the App Catalog
1) First, go to ‘Site contents’ for the site collection and remove the Wizdom app by clicking the three dots and then REMOVE. It can take a while for the app to be removed.
3) In the Site Collection Administration section, select Recycle bin (_layouts/15/AdminRecycleBin.aspx)
4) Select the app and click on Delete Selection
5) On the same page, click second-stage recycle bin
6) Finally in the second-stage recycle bin, select the app and click on Delete Selection
7) Now, the app will have to be deleted from the app catalog. Open the app launcher and click the ‘Admin’ icon to go to the Office 365 Admin Center.
4) Create a New App with PowerShell
This is done by running a PowerShell script named ‘GenerateAppPackage.ps1’ and is found in this zipped folder.
1) Download the zip-file and extract the content.
2) To execute the script in the file, in ???program???, first navigate to this folder. To navigate to the folder in ???program??? write: cd ”” (remember double quotes). After this, execute the script as follows:
To make a new GUID in PowerShell, run the following command:
[guid]::NewGuid()
6) Add the New Wizdom App to the Intranet
1) The easiest way to do this is by clicking ‘Add an app’ from the settings wheel.
3) If it doesn’t allow you to trust it, you can send an approval request in the SharePoint dialog that appears. The admin now has to approve it here: https://<tenant>.sharepoint.com/sites/apps/AppRequests/ActiveRequests.aspx
Once approved, you are able to add the app again and press ‘Trust it’.
4) If the admin cannot approve the app and only sees the requested item, then go here https://<tenant>-admin.sharepoint.com/_layouts/15/appinv.aspx, find the App you just registered (client ID) and paste the following into the bottom text area and press ‘Create’.
<AppPermissionRequests AllowAppOnlyPolicy="true" >
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" />
<AppPermissionRequest Scope="http://sharepoint/social/tenant" Right="FullControl" />
<AppPermissionRequest Scope="http://sharepoint/search" Right="QueryAsUserIgnoreAppPrincipal" />
<AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />
<AppPermissionRequest Scope="http://sharepoint/taxonomy" Right="Write" />
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" />
</AppPermissionRequests>
5) If this doesn’t allow you to add the App, then the Tenant Admin must use the App Approval link, that is sent in the request mail.
This will trigger the correct workflow, and you can now approve the App.
You can now add the App.
That’s it!
Now go to the intranet front page and make sure that all Wizdom web parts work. Also, test the Wizdom app by going to Wizdom Configuration Center and confirm that everything work well in there as well.
If you encounter errors, then double-check that you have followed all steps in this guide thoroughly. Optionally, you can try and add the Wizdom app once again or to reinstall the app in the app catalog.
If Wizdom’s web parts still doesn’t work after this, but Wizdom Configuration Center opens and loads correctly, then try and go to the ‘Installation’ module in the ‘Admin’ part of Wizdom Configuration Center and click ‘Install’. This will make Wizdom try to reinstall the scriptloader on the current site collection and in some cases this can solve the issue.
If you have Wizdom installed on multiple site collections, and rather not want to install Wizdom on each and every site collection one by one, you can force an update of all site collections by adding a new dummy custom module in the ‘Custom Module’ part of Wizdom Configuration Center and then delete it again afterwards.
If Wizdom’s web parts are still not working after these actions, a reason can be that SharePoint has cached the expired client id/secret. This caching can last up till 12 hours and you will simply have to wait to find out whether this was the issue.