Skip to content

Commit 126f5e9

Browse files
Merge pull request SharePoint#4849 from andrewconnell/docfix-issue3223
Markdown cleanup, image imgration
2 parents f946140 + b778889 commit 126f5e9

13 files changed

+29
-20
lines changed

docs/solution-guidance/development-experience-tenant-apponly-permissions-in-sharepoint-online.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,92 @@
11
---
22
title: Developing using Tenant permissions with App-Only in SharePoint Online
3-
ms.date: 11/03/2017
3+
ms.date: 11/01/2019
44
localization_priority: Priority
55
---
66
# Developing using Tenant permissions with App-Only in SharePoint Online
77

8-
The developer experience has changed for SharePoint **Provider-hosted Add-ins** that require **Tenant permission in combination with app-only**. This article walks you through the new experience for developing and debugging these solutions.
8+
The developer experience has changed for SharePoint **Provider-hosted Add-ins** that require **Tenant permission in combination with app-only**. This article walks you through the new experience for developing and debugging these solutions.
99

1010
_**Applies to:** Provider Hosted Add-ins for SharePoint Online_
1111

12-
1312
## Understanding the Problem
13+
1414
In Visual Studio, you navigate to Debug, start debugging and receive a message that "**Your tenant administrator has to approve this app**" as depicted below.
15-
![](http://i.imgur.com/oFH9oqb.png).
15+
16+
![](media/development-experience-tenant-apponly-permissions-in-spo-01.png)
1617

1718
The reason why you can't click **trust it** is because Visual Studio is working against the dev site collection you've specified in your project settings whereas tenant level permissions with app-only can only be granted via [trusting it against your tenant administration site](https://msdn.microsoft.com/en-us/pnp_articles/how-to-provide-add-in-app-only-tenant-administrative-permissions-in-sharepoint-online).
1819

1920
## Walkthrough
21+
2022
### Step 1: Create a new service principal
23+
2124
Navigate to a site collection in your tenant and generate a new client Id and Secret. (E.g., https://contoso.sharepoint.com/_layouts/15/appregnew.aspx). In this page click **Generate** for both the **Client Id**, **Client Secret** Fields and supply the remaining fields. While you are developing the add-in ensure you use localhost.com including the port as the App Domain. You should have something similar as below.
2225

23-
![](http://i.imgur.com/5CfHgFD.png)
26+
![](media/development-experience-tenant-apponly-permissions-in-spo-02.png)
2427

2528
### Step 2: Grant Tenant Permissions
26-
In order to perform this step, you must be a SharePoint Online Administrator.
2729

28-
Navigate to the SharePoint Admin Center (E.g., https://contoso-admin.sharepoint.com/_layouts/15/appinv.aspx) and grant the tenant permissions
29-
![](http://i.imgur.com/EGuJG3a.png)
30+
In order to perform this step, you must be a SharePoint Online Administrator.
31+
32+
Navigate to the SharePoint Admin Center (e.g., https://contoso-admin.sharepoint.com/_layouts/15/appinv.aspx) and grant the tenant permissions
3033

31-
![](http://i.imgur.com/dst9ZdP.png)
34+
![](media/development-experience-tenant-apponly-permissions-in-spo-03.png)
3235

36+
![](media/development-experience-tenant-apponly-permissions-in-spo-04.png)
3337

3438
### Step 3: Update your manifest and web.config
39+
3540
In the Visual Studio solution; update the manifest and web.config with the client id created in step 1.
36-
![](http://i.imgur.com/fKkLIde.png)
3741

42+
![](media/development-experience-tenant-apponly-permissions-in-spo-05.png)
3843

3944
### Step 4: Package the app and add the .app file to the App catalog
45+
4046
Right click on the SharePoint Add-in project and click publish.
4147

4248
Supply the **Client ID** and **Client Secret **created in Step 1.
4349

44-
![](http://i.imgur.com/XpM9rwb.png)
50+
![](media/development-experience-tenant-apponly-permissions-in-spo-06.png)
4551

4652
Since you want to debug the add-in, ensure that you supply https://localhost.com including the port as depicted below.
47-
![](http://i.imgur.com/nQmSbPC.png)
53+
54+
![](media/development-experience-tenant-apponly-permissions-in-spo-07.png)
4855

4956
Now deploy the add-in in the app catalog site.
5057

5158
### Step 5: Install your add-in in your developer site collection
5259

5360
Navigate to the developer site and add the app. Click on **App Details**.
54-
![](http://i.imgur.com/Aihr4r7.png)
61+
62+
![](media/development-experience-tenant-apponly-permissions-in-spo-08.png)
5563

5664
If you clicked on the app tile, you will have to click on "**Find out why**" and request your app
57-
![](http://i.imgur.com/DwWUkG0.png)
65+
66+
![](media/development-experience-tenant-apponly-permissions-in-spo-09.png)
5867

5968
Once the request has been submitted the status will be in a pending state until the SharePoint Administrator or the app catalog Administrator approves the request. To approve the request, navigate to the app catalog, App Requests and approve the request.
6069

61-
![](http://i.imgur.com/yZ8vNEc.png)
70+
![](media/development-experience-tenant-apponly-permissions-in-spo-10.png)
6271

6372
Once the request has been approved the add-in may now be installed.
6473

65-
![](http://i.imgur.com/PMitOEY.png)
74+
![](media/development-experience-tenant-apponly-permissions-in-spo-11.png)
6675

6776
### Step 6: Debug your Add-in
77+
6878
In Visual Studio right click your web project and select **Debug** Start new instance. Once started, navigate to your site and launch the add-in.
6979

70-
![](http://i.imgur.com/Y5vAlDr.png)
80+
![](media/development-experience-tenant-apponly-permissions-in-spo-12.png)
7181

72-
> [!NOTE]
82+
> [!NOTE]
83+
>
7384
> - If for some reason your app package file changes you'll need to redeploy it to the app catalog and re-install it to your development site collection
7485
> - If you're add-in has an appinstalled event receiver you'll need to ensure that you've done step 6 before you do step 5
7586
76-
7787
## See also
7888
<a name="bk_addresources"> </a>
7989

8090
- [Add-in app only tenant administrative permissions in SharePoint Online](https://msdn.microsoft.com/en-us/pnp_articles/how-to-provide-add-in-app-only-tenant-administrative-permissions-in-sharepoint-online)
8191
- [Add-in permissions in SharePoint 2013](https://msdn.microsoft.com/en-us/library/office/fp142383.aspx)
8292
- [Explore the app manifest structure and the package of a SharePoint Add-in](https://msdn.microsoft.com/en-us/library/office/fp179918.aspx)
83-
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)