Skip to content

Commit 3ec4e9b

Browse files
Merge pull request SharePoint#7777 from westleyMS/patch-15
Update security-apponly.md
2 parents f7cceb0 + 7741949 commit 3ec4e9b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/solution-guidance/security-apponly.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Accessing SharePoint using an application context, also known as app-only
33
description: Accessing SharePoint using an application context, also known as app-only
4-
ms.date: 04/22/2020
4+
ms.date: 03/03/2022
55
ms.prod: sharepoint
66
author: vesajuvonen
77
ms.author: vesaj
@@ -12,10 +12,12 @@ ms.localizationpriority: medium
1212
# Accessing SharePoint using an application context, also known as app-only
1313

1414
There are two approaches for doing app-only for SharePoint:
15+
1516
- Using an **Azure AD application**: this is the preferred method when using SharePoint Online because you can also grant permissions to other Office 365 services (if needed) + you’ve a user interface (Azure portal) to maintain your app principals.
1617
- Using a **SharePoint App-Only principal**: this method is older and only works for SharePoint access, but is still relevant. This method is also the recommended model when you’re still working in SharePoint on-premises since this model works in both SharePoint on-premises as SharePoint Online.
1718

1819
Both methods are detailed in following articles:
20+
1921
- [Granting access via Azure AD App-Only](security-apponly-azuread.md)
2022
- [Granting access using SharePoint App-Only](security-apponly-azureacs.md)
2123

@@ -25,11 +27,13 @@ App-Only does not work in following cases:
2527

2628
- Updating taxonomy service entries (write) - read works
2729
- Creating modern team sites does not support app-only when you [use the SharePoint API](https://github.com/SharePoint/PnP-Sites-Core/blob/master/Core/OfficeDevPnP.Core/Sites/SiteCollection.cs) for it. When modern team sites are created [using Microsoft Graph](https://github.com/SharePoint/PnP-Sites-Core/blob/master/Core/OfficeDevPnP.Core/Framework/Graph/UnifiedGroupsUtility.cs) to create the group then app-only is a supported scenario
28-
- Creating communication sites is supported in app-only context, but owner property is required. [using the SharePoint API](https://docs.microsoft.com/sharepoint/dev/apis/site-creation-rest)
30+
- Creating communication sites is supported in app-only context, but owner property is required. [using the SharePoint API](/sharepoint/dev/apis/site-creation-rest)
2931
- Search when using SharePoint On-Premises. SharePoint Online support for it has been added ([blog post](https://blogs.msdn.microsoft.com/vesku/2016/03/07/using-add-in-only-app-only-permissions-with-search-queries-in-sharepoint-online/))
3032
- User Profile CSOM write operations do not work with **Azure AD application** - read operations work. Both read and write operations work through **SharePoint App-Only principal**
3133
- User Profile Bulk Update API can be used with app-only permissions
32-
- Manipulating files via WebDav protocol and CSOM (using `File.SaveBinaryDirect`) does not work with app-only
34+
- Manipulating files via WebDav protocol and CSOM (using `File.SaveBinaryDirect` or `File.OpenBinaryDirect`) does not work with app-only. Use `File.SaveBinary` and `File.OpenBinaryStream` instead.
35+
- The use of the `Microsoft.SharePoint.Client.Web.ShareObject()` API was not tested with app-only permissions, and may not work consistently.
36+
The recommendation is to use it only with an app+user context.
3337

3438
> [!IMPORTANT]
3539
> If the above scenarios are critical for you it's recommended to define a service account, grant that one permissions and then use it in your application. See the [Governance.EnsurePolicy](https://github.com/SharePoint/PnP/tree/master/Solutions/Governance.EnsurePolicy) sample to learn more on how you can grant tenant wide permissions for a service account. Also the article explaining an [alternative model for web app policies in SharePoint Online](security-webapppolicies.md) does contain a lot of information on this topic.

0 commit comments

Comments
 (0)