This guide will walk you through how to generate a new Wizdom app with associated Client ID and Client Secret.
Before you start, you’ll need the following:
1) A tenant administrator user for the Office 365.
2) Download Microsoft Online Management Shell
Register the App in SharePoint
1) Go to the App Registration page of the Site Collection where you want to register your new Wizdom App. <site collection url>/_layouts/15/AppRegNew.aspx
2) In the form, you need to fill in the details as seen in the image below.
a) Press 'Generate' next to the Client Id field.
b) Once the page has reloaded, press 'Generate' next to the Client Secret field.
c) Give your new Wizdom App a title, e.g. Wizdom365.
d) Fill in the App Domain, e.g. example.azurewebsites.net.
e) Fill in the Redirect URI, e.g. https://example.azurewebsites.net/.
NOTE: Remember the forward slash in the end "/".
3) Press 'Create' to register the new Wizdom App.
Creating a new app with PowerShell
Now, you’ll need to create a new Wizdom app. This is done by running a PowerShell script named ‘GenerateAppPackage.ps1’ and is found in this zipped folder here.
1) Download the zip-file and extract the content.
2) To execute the script in the file, first navigate to the folder where the 'GenerateAppPackage.ps1' script is. Execute the script as follows:
You can execute the script by pasting the values from your new App registration into the below script or by running only '.\generateAppPackage.ps1' and then fill in the values when PowerShell ask for it.
.\generateAppPackage.ps1 -clientid "<clientid>" -appurl "<appurl>" -outfile <appnavn>.app [–productid "productid" -title "<title>" -name "<title>"]
Running inline PowerShell script:
You replace the parameters with the respective values you created earlier.
- App URL (same URL that you filled in the ‘Redirect URL’)
- App name (same name that you filled in the ‘Title’ field).
The three last parameters [in brackets] are optional and only used if more apps have the same name.
Running full PowerShell script:
When running the full script '.\generateAppPackage.ps1', the program will ask you for the info needed.
The new App you just registered earlier is basis for the info you should provide:
- App URL (same URL that you filled in the ‘Redirect URL’)
- Outfile, e.g. Wizdom365.app
- Title, e.g. Wizdom365
- Name, e.g. Wizdom365
- ProductID (see below instructions how to generate new GUID)
Create new GUID:
To make a new 'productid' (GUID) in PowerShell, run the following command:
The new App file is now generated and can be found in the same folder as the .ps1 file.
Updating the New Client ID and Secret in Azure
Now, you’ll need to update the ClientID and Client Secret for the Wizdom app in Azure.
1) Go to https://portal.azure.com/ and log in to find the Wizdom Azure website.
2) Select Resource Groups, and click resource group = <wizdomrg>
3) Click the web app service = <wizdomweb>
4) Select Configuration
5) Update the ClientID and the ClientSecret with the new values from the new App registration. You can either update the current value or re-add these 2 Application settings.
NOTE: Please make sure that all Application settings connected to any old Wizdom App is deleted.
6) Click 'Save' and restart the web app.
Deleting the old app from the Intranet and the App Catalog
Before you can generate and add a new app, that uses the new client id and secret, the old Wizdom app must be deleted. This will have to be done in the relevant site collection as well as in the app catalog.
1) First, go to ‘Site contents’ for the Site Collection and remove the old expired Wizdom app by clicking the three dots and then REMOVE. It can take a while for the app to be removed.
2) Next click on the Settings menu and select Site Settings.
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
Now, the app will have to be deleted from the App Catalog.
7) Open the app launcher and click the ‘Admin’ icon to go to the Office 365 Admin Center.
8) From here, click ‘SharePoint’ under ‘Admin centers’ to go to the ‘SharePoint admin center’.
9) In the SharePoint admin center, click ‘Apps’ (found in the left menu or through 'More features'. From there click ‘App Catalog’ to go to the App Catalog.
10) Click ‘Apps for SharePoint’ in the left menu. Here you’ll find a list of SharePoint apps. Find the app that you want to delete, mark it, and press Delete on your keyboard.
11) Finally, delete the app from the Admin Recycle Bin.
Add new App to App Catalog
Now, you can upload the App package you just created to the App Catalog.
You can either drag-and-drop the file into the list or manually upload it. Once it has been uploaded, please make sure that the App has no errors and is valid.
Adding the new Wizdom app to the Intranet
Finally, you add the app to the site collection where you need the Wizdom functionality.
1) The easiest way to do this is by clicking ‘Add an app’ from the settings wheel.
2) Make sure you are using the Classic experience in SharePoint.
3) In the left menu of the page, under ‘Apps You Can Add’ click ‘From Your Organization’. Find the new Wizdom app, click on it and click ‘Trust it’.
3) If you cannot add the App and a 'Find out why' link appear just below the App, then click the link.
4) Request an approval in the pop-up form. A Tenant Administrator will now receive an email with this request.
5) The Tenant Administrator now has to approve the request by clicking the approval link in the email. This will start the SharePoint Approval flow and add the new App to the Site Contents.
6) SharePoint has now implemented a new approval link, which also can be used to approve the app. This can be found in the App Requests section of the SharePoint Administration.
Test and validate
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 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.