Implementing SSL with PowerShell for existing SharePoint 2013 farm – Part 7

In this 7th part of the series I focus on the Provider Hosted Add-Ins you might have. Those add-ins files contain references to the start page of the web application. That URL has changed too.

AppCatalog

In the AppCatalog all your Add-ins are installed. And for each Add-In there is an .app file.

AppCatalog

You have to download each App file for every Provider Hosted Add-In, because that file contains a manifest that needs to change.

Make_App_File

The App file is actually a ZIP file, so you can use WinZip or 7-Zip to unzip the file to a folder.

Make_App_File_Contents

The file AppManifest.xml needs to get updated. If you open that file with some text or code editor, you’ll see this:

<?xml version="1.0" encoding="utf-8"?>
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest" Name="MaventionMakeforSharePoint" ProductID="{e7e04be7-dae8-4588-bce5-38a50db2d8c3}" Version="2.4.1.0" SharePointMinVersion="15.0.0.0">
  <Properties>
    <Title>Mavention Make for SharePoint</Title>
    <StartPage>http://make.company.com/pages/default.aspx?{StandardTokens}&amp;version=1.0.0.0</StartPage>
    <SupportedLocales>
      <SupportedLocale CultureName="en-US" />
    </SupportedLocales>
  </Properties>
  <AppPrincipal>
    <RemoteWebApplication ClientId="f0dc0a7b-833f-4d1d-b4cd-a687b92aedf7" />
  </AppPrincipal>
  <AppPermissionRequests AllowAppOnlyPolicy="true">
  </AppPermissionRequests>
</App>

The element <StartPage> contains the invalid HTTP URL. We need to change that to HTTPS. Also, update the Version attribute in the <App> element. This will trigger all installed instances of the Add-In to update using the new StartPage URL.

Save the file and then select all files to zip it again. Rename the ZIP file to .APP again.

Once the new .App file has been created, it can be uploaded to the AppCatalog. Just overwrite it with the existing one. That’s all.

image

image

New updated App file with new Version 2.4.2.0 (was 2.4.1.0)

Browsing to the site where Make was deployed (https://makeadmin.company.com) the Add-Ins shows there an update available.

image

Get it now! Smile

Add-In IIS Web Application

While we have updated the Add-In on the SharePoint side, it is most likely that some web.config at the IIS Web Application for the Provider Hosted Add-In needs to get updated as well. Please do check every configuration file for URLs to update to use HTTPs.

Where’s PowerShell?

Good question! Although there some good articles on the net, you should be very careful changing a Provider Hosted Add-In. Take some good time to test each and one of them. I chose not to automate it all (besides, I had only 3 Add-Ins to update).

If you choose to use PowerShell some articles I found are:

https://blog.lekman.com/2016/04/automating-sharepoint-app-packages.html

http://blog.repsaj.nl/index.php/2014/10/sp2013-modifying-app-package-appmanifest-xml-on-deployment/

Share