How to publish our provider hosted app on SharePoint Online

Requirements:

 

Prepare your Visual Studio Solution

First of all, open the SharePoint app solution in your visual Studio. In the solution you will have almost two projects. A SharePoint project for the SharePoint side and a web project for the Remote web.

You will need to create a profile for the remote web in order to deploy to an existing IIS. In my case I published it on azure IIS but you can do the same with your local IIS.

SharePoint Online

Once you have that, you can publish the remote web.

 

Inside the remote web you should check:

The web.config file

There are two keys that you should have inside <Appsettings> tag:

  • ClientId
  • ClientSecret

You have to keep these values because you will use them in order to link with the app in the SharePoint side. I usually copy them to a notepad window.

 

SharePoint Online

 

Now click right button over the SharePoint Project and select Publish.

 

SharePoint Online

 

Here you will see that you have to complete the deployment profile. Click on Edit.

SharePoint Online

 

At this point, you have to introduce the SAME values that you had in the web.config

SharePoint Online

 

Now we are ready to build the app. Click on “package the app”.

SharePoint Online

SharePoint Online

Here you have to introduce the same Client ID that you had on the web.config and click Finish.

Now an explorer window will be opened. Where you can localize the <app name>.app. This file will be uploaded to SharePoint online manually.

SharePoint Online

Register the app

Now let’s open a browser and let’s go to the SharePoint online site. We can upload the app to the app catalog but in development period is easier register the app manually.

Before upload the app to SharePoint online. You need to register the app using this page:

https://<your SharePoint online URL>/_layouts/appregnew.aspx

 

Once you register the app (creates internally a registration inside SharePoint) now you will be able to add the app to your site.

 

 

 

You should trust the app clicking “Trust it” button and after few seconds your app will be installed in your SP web.

 

SharePoint Online

 

Now if click on the app you will be redirected to your remote web.

In my case is iocsampleapp.azurewebsites.net but in your case would be a dedicated web server.

SharePoint Online

Never miss an update by following us and subscribing to our monthly newsletter!

Summary
How to publish our provider hosted app on SharePoint Online
Article Name
How to publish our provider hosted app on SharePoint Online
Description
How to publish our provider hosted app on SharePoint Online
Author
Publisher Name
Atos Consulting CH
Publisher Logo

2 thoughts on “How to publish our provider hosted app on SharePoint Online

  1. Avatar
    IVR Services in Noida Reply

    I would just like to tell that I really liked your blog post. In fact I am going to bookmark your blog and will regularly visit the site. You come up with such an amazing articles thank you for sharing this your site.

Leave a Reply

Your email address will not be published. Required fields are marked *