SharePoint Pals
 | Sign In
Step by Step Procedure to Create a Low Trust Provider Hosted App for Office 365 and Host the AppWeb in Azure WebSite
by Sathish Nadarajan 15 Aug 2016
SharePoint MVP
Today  :   15     Total  :    2179

In the earlier article, we saw how to create a high trust Provider Hosted App Long time back. Now, let us see how to create a Low trust Provider Hosted App for Office 365, in fact Office 365 accepts only Low Trust Apps alone and Host the App web in Azure WebSite.

The Pre-requires are as follows.

1. Office 365 Subscription

2. Azure subscription

3. Visual Studio 2015 (Professional/Community/Enterprise Edition)

With the pre-requisites ready, let us start with step by step

1. Login to the Office 365 and Create a Developer Site.


2. Login to Azure and Create a Web Application. To Create a Web Application, please REFER THE LINK HERE

3. In our case, I have created the Web Application Name as “O365PHA”

4. The URL will be

5. Now, come back to the O365 Site. i.e., the Developer site, which we created.

6. Open the Page, https://****


7. Generate the ClientID and Client Secret ID. Give the Title, AppDomain and Redirect URI as below.


8. Click on Create.


9. Copy the Information (Client ID, Client Secret ID etc., in a NotePad)

10. Now, open the Visual Studio 2015.

11. Create a New Project.


12. Enter the Developer Site URL and Select Provider Hosted App.


13. On Click of Next, the Credentials Window will be popup. Enter the Credentials.


14. Once, login, the below window will appear. Select SharePoint Online on it.


15. Choose the WebProject Type based on our requirement.


16. Select the Authentication Settings. Use the Windows Azure Access. Because Office 365 can only be Low Trust. Using Certificate is a high trust App.


17. Project will be Created.


18. Once, the project Created, the solution structure will be as follows.


19. Open the Web.Config and Update the ClientID and Client Secret with the Values which we created in the earlier steps.


20. Update the AppManifest.XML as below.

 <?xml version="1.0" encoding="utf-8" ?>
 <App xmlns=""
     <RemoteWebApplication ClientId="29b7b92a-2e2c-42b1-a4bc-1a16e01736c5" />
   <AppPermissionRequests AllowAppOnlyPolicy="false">
     <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" />

21. Now, we are done with the steps. We need to publish the AppWeb to the Azure Web App Created.

22. Right Click on the AppWeb Project. Click on Publish.


23. Click on “Microsoft Azure App Web”


24. On the next Screen, Login to the Azure account and select the WebAPP which we created.


25. On Click OK, the publishing Profile will be automatically downloaded and populated.


26. Validate Connection – After getting the Success, Click on Next.

27. On the next screen, I am selecting Debug option. In later we are going to see, how to debug the AppWeb Also. But not in this article.


28. After the Start Preview, the list of files, which are going to be deployed is shown as below.


29. Click on Publish. We are done. Successfully published.


30. Now, go back to Azure Web Site and make the Configuration Changes.


31. Click on Configure Tab.

32. Scroll down and Enter the AppSettings as shown below.


33. Click on Save at the Bottom.

34. Now, we will publish the APP project into SharePoint Office 365.

35. Let us publish the APP Project to the File system and upload the same to AppCatalog Site. To know more about the creation of AppCatalog Site, REFER HERE.

36. Now, coming back to Visual Studio. Right Click on the APP Project. Click on Publish.


37. The Publish Screen will appear as below.


38. On the Current Profile, there is a warning Symbol. Click on Edit and Enter the Client ID and Client Secret Properly.


39. Now, the Warning symbol has gone.


40. Click on “Package the app” and Enter the URL with HTTPS and the Client ID.


41. App is successfully packaged.


42. We will get the .APP File in the bin\debug\app.publish\version\ Folder.

43. Upload the APP file into AppCatalog Site Manually.

44. In My Case, the AppCatalog Site is something like

45. Go to “Apps for SharePoint” List.


46. Upload the new APP File here.


47. The AppLoaded APP will be something as below.


48. Now, come back to our Developer Site. Go to “Site Contents”


49. Click on “Add an APP”.

50. Add the “APP from your Orgnization”


51. Trust The App.


52. The App will be listed on the ViewLsts.aspx


53. Launch the App. We will get the App Launched.


54. The Name of the Site is displayed.

Though it is a bit very lengthy, but I wanted to cover this topic in detail as much as I can.

Happy Coding,

Sathish Nadarajan.

blog comments powered by Disqus

SharePoint Pals

SharePoint Pals, a community portal for SharePoint developers, Administrators and End Users. Let's join hands and share the point together.
Read this on mobile


Angular Js Training In Chennai
Advanced Angular Js training with real world developer scenarios
Angular Js, Web Api and Ionic for .Net Developers
All in one client side application development for .Net developers
Angular Js For SharePoint Developers
Get ready for the future. Its no more just C#

Get Connected

SharePoint Resources

SharePoint 2013 and 2010 Web Parts
Free Web Parts with Source Code for SharePoint Community

SharePoint 2013 Books and Tutorials
Collection of free SharePoint 2013 books and tutorials (eBooks, pdfs)

Supported By

Contribute your article and be eligible for a one month Free Subscription for Plural Sight. The Author of the most popular New Article (published in the previous month) will be awarded with a Free One month Plural Sight Subscription. Article can be sent to in a word document.

Related Resources

Recent Tweets

Twitter October 23, 22:21
How to Add/Remove User Custom Actions (in Site Actions Menu) Programmatically using CSOM PNP in SharePoint -

Twitter October 21, 21:34
How to Add a JS Link Reference to the Display Form or Any other ASPX Programmatically using CSOM PNP in SharePoint -

Twitter October 20, 13:01
How to Add a JS Link Reference to the NewForm and EditForm Programmatically using CSOM PNP in SharePoint Office 365-

Twitter October 12, 12:15
How to Deploy Provider Hosted Apps (Add-Ins) by App Stapling in SharePoint Office 365 -

Twitter October 11, 13:39
How to Deploy Provider HostedApp programmatically using CSOM in SharePoint Office 365 Activating Developer Feature -

Follow us @SharePointPals
Note: For Customization and Configuration, CheckOutRecent Tweets Documentation