0

Provider Hosted App (Add-in) on SharePoint Online in 5 steps – Step 5/5

Step 5: Create Publishing Profiles for SharePoint Online and publish

  • Create a new Publishing Profile for SharePoint app and provide the Client ID and Client Secret

New Publishing Profile to deploy SharePoint APP

New Publishing Profile to deploy SharePoint APP Step 2

New Publishing Profile to deploy SharePoint APP Step 3

Publish the app or Hit F5. An you should see similar screens as below

App Install Page

  • Following is the screen capture of the app, this is just a simple HTML and JavaScript added to default.aspx page.

SharePoint Online Showing the Final App

Note:  This blog post has been to split into multiple posts as they render fast with fewer images and it will greatly enhance the experience for readers accessing this via mobile devices

0

Provider Hosted App (Add-in) on SharePoint Online in 5 steps – Step 4/5

Step 4: Create Publishing Profiles for Azure Web App and publish

Create a new Publishing Profile for Azure web app and publish

  • Import the azure Publishing Profile downloaded in Step 1
    Import Publishing Profile
  • Once you import the publish settings files you will fine similar to following and validate your connectionImport Publishing Profile Summary

Select Profile Debug Publish

  • Preview will show the files that will be published to Azure Web App.

Optional Preview Step

  •  Publish the Azure Web App.

Continue to Step 5: Create Publishing Profiles for SharePoint Online and publish>>

 

Note:  This blog post has been to split into multiple posts as they render fast with fewer images and it will greatly enhance the experience for readers accessing this via mobile devices

0

Provider Hosted App (Add-in) on SharePoint Online in 5 steps – Step 3/5

Step 3: Register the app and update the Visual Studio

  • Step 3 a: Register the app in SharePoint
    • Go the URL on your SharePoint Online Site: https://yourname.sharepoint.com /_layouts/15/appregnew.aspx
    • Click generate for Client Id and Secret, new ids will be generated
    • Give a title to the app of your choice
    • Add app domain: This is your Azure web app with out HTTP or HTTPS
    • Redirect URI: You may enter the URI: http://yourazureurl/default.aspx
      • This part is tricky there are developers that use just HTTP and no /default.aspx in the end
    • Please follow Register SharePoint Add-in from MSDN for more informationRegister App on SharePoint online

      This is the most important step of all. Please save the following info you need this information later on!!

      App Identier Created Successfull Message

  • Step 3 b: Update web.config file of the Azure Web App Project: Update ‘Client Id’ and ‘Client Secret’
  • Web Config Changes for Azure Web App
  • Step 3 c :Update the Permissions section of Manifest.xml by double clicking the the fileChange the App Manifest Permissions
  • Step 3 d: Update code of Manifest.xml by right clicking the file and click ‘<> View Code’App Manifest Code File Changes

Continue Step 4: Create Publishing Profiles for Azure Web App and publish>>

Note:  This blog post has been to split into multiple posts as they render fast with fewer images and it will greatly enhance the experience for readers accessing this via mobile devices

0

Provider Hosted App (Add-in) on SharePoint Online in 5 steps – Step 2/5

Step 2: Configure Visual Studio for development

Step 2 a: Create a new project of Type ‘Apps for SharePoint’

Create Visual Studio Project

Enter the SharePoint Site URL where this app needs to be deployed and select Provider-hosted

Site Name and Select Provider Hosted APP

You will prompted to enter your office 365 credentials to select the version of the SharePoint

Connect Visual Studio with Office 365

Please select SharePoint Online

Select the SharePoint version

Leave the default Option, unless you want to use certificate authentication.

App Authentication

Choose the web application project of your choice

Select Web Application Type

  • Two projects will be created
    • One for SharePoint online – ThermoConverterApp
    • One for Azure Web App     – ThermoConverterAppWeb

If you publish/deploy ‘ThermoConverterAppWeb’ it will be deployed to Azure and the if you deploy/publish ‘ThermoConverterApp’ it will be deployed to SharePoint. Notice the icons to differentiate better.

Visual Studio with two project

Once you are complete with all the above steps, please check the properties of project, the ‘SiteURL’ should match your SharePoint Online site.

SharePoint Project Properties

Continue to Step 3: Register the app and update the Visual Studio>>

Note:  This blog post has been to split into multiple posts as they render fast with fewer images and it will greatly enhance the experience for readers accessing this via mobile devices

1

Provider Hosted App (Add-in) on SharePoint Online in 5 steps – Step 1/5

This blog post is a mere refresher to the folks who already know what SharePoint apps are and also know the basic difference between SharePoint hosted and Provider hosted app.

This blog post unfortunately does not get into the weeds but focuses on quickly connecting all the dots to quickly set up a provider hosted app for development. If you would like to choose pattern for your development read this MSDN Article

A picture is worth a thousand words, most of the blog post will have loads of images and they will speak for them selves.

Let’s get started! Following are the steps to get a basic Provider Hosted App up and running!

Step 1:  Create a Azure Web App to host your code and download Publishing Profile

Step 2:  Configure Visual Studio for development

  • Step 2 a: Create a new project of Type ‘Apps for SharePoint’
  • Step 2 b: Choose .NET 4.5 as target framework
  • Step 2 c: Enter the SharePoint Site URL where this app needs to be deployed
  • Step 2 d: Choose the type of app as ‘Provide hosted app’
  • Step 2 e: Enter Office 365 Credentials to connect visual studio with Office 365
  • Step 2 f:  Create a new publishing profile, import the Azure web app profile and Publish

Step 3: Register the app and update the Visual Studio

Step 4: Create Publishing Profiles for Azure Web App and publish

Step 5: Create Publishing Profiles for SharePoint Online and publish

Step 1: Create a Azure Web App to host your code and download Publishing Profile 

Create New Web App

Create Azure Web App

Create Azure Web App Running

Download Publishing Profile

  • Download publishing settings and save it for later use in Step 4

Download Publishing Profile

Continue to Step 2 :Configure Visual Studio for development >>

Note:  This blog post has been to split into multiple posts as they render fast with fewer images and it will greatly enhance the experience for readers accessing this via mobile devices