What good is an application if folks can’t actually use it? So far, we’ve just been running and testing the application in Visual Studio. That’s all fine and well, but asking our Help Desk operators to fire up Visual Studio each time they need to go to work just doesn’t really seem feasible.
We could start by creating a new Web App directly in Azure. That would work fine, but since we’re developers, let’s just use the Visual Studio tooling that’s already available. There are a LOT of tutorials on creating and deploying an Azure Web App on the Internet, so we won’t reinvent that wheel here. However, we do need to make a couple of modifications from a stock Azure Web App deployment for all of this to work.
First, we need to export our .CER certificate that we created earlier to a .PFX certificate. Remember that we installed the certificate into our Personal store. To export the certificate, we first need to launch CertMgr by running certmgr.msc.
In the window that opens, expand Certificates and then Personal:
Then, find the BusinessApps.HelpDesk certificate that we created earlier, right click on it and choose All Tasks –> Export…
In the window that opens, click Next:
Select Yes, export the private key and click Next:
Leave ‘Personal Information Exchange – PKCS #12 (.PFX) selected and click Next:
Check the Password box and enter a suitable password:
Finally. choose an output location and click Next:
Confirm the information in the final screen and click Finish:
If all goes well, a success screen will be displayed:
Next, we’ll go to the Azure portal and find the new BusinessApps-HelpDesk web application and into the Configure screen.
Scroll down a bit in the screen, find the certificate section, and click ‘upload a certificate’:
In the window that opens, browse to find the certificate that we just saved, enter the password, and click the check mark:
After the certificate has uploaded and been added, we’ll copy the Thumbprint value to our clipboard:
Then, we’ll scroll down to find the app settings section, enter WEBSITE_LOAD_CERTIFICATES for a new app settings and the thumbprint from above as the value, and click Save:
If all goes well, the portal will give us a message that the configuration was updated successfully:
And that’s it! If we launch our sweet new app, it should load as expected:
How cool is that? Now, go show all of your co-workers how awesome of an Office 365 and Azure developer you have become!
The Help Desk Demo
- The Help Desk demo, Part 1 – Creating the project
- The Help Desk demo, Part 2 – Azure Active Directory
- The Help Desk demo, Part 3 – Authentication
- The Help Desk demo, Part 4 – Microsoft Graph
- The Help Desk demo, Part 5 – SQL Azure
- The Help Desk demo, Part 6 – SharePoint
- The Help Desk demo, Part 7 – Wiring it all up
- The Help Desk demo, Part 8 – Deploying to Azure
The entire source code for the Help Desk demo can be found here https://github.com/OfficeDev/PnP/tree/dev/Solutions/BusinessApps.HelpDesk/, in the Office 365 Dev PnP GitHub repository.