Skip to content

Commit e5c8249

Browse files
New content migration-perm-guidance.md and spod-copy-move-api.md (SharePoint#5812)
* Add AMR workflow link uploaded .png file * onenote-migration-flow.png diagram for API * Onenote-migration-flow.png Updated diagram. * Delete onenote-migration-flow.png * onenote-migration-flow diagram for onenote migration * Delete onenote-migration-flow.png image in wrong folder. * adding onenote migration image migration image. * Add two new images For new article on migration permission guidance * Create new file migration permission guidance Create new topic for migration permission guidance * Create spod-copy-move-api.md New Microsoft 365 copy move api. * Update spod-copy-move-api.md update metadata * Update spod-copy-move-api.md * Update spod-copy-move-api.md * Update migration-perm-guidance.md Edits to metadata, formatting. * Update migration-perm-guidance.md upcased the alert words * resolved issues upcased alert words, added metadata for date. * Update spod-copy-move-api.md removed html breaks, up-cased alerts, removed bolding from table headings. * Update spod-copy-move-api.md changed parameters to having inline code * Update spod-copy-move-api.md * Add files via upload * Update migration-perm-guidance.md * update `ms.date` to MM.DD.YYYY format * update `ms.date` to MM.DD.YYYY format Co-authored-by: Andrew Connell <[email protected]>
1 parent 97522c0 commit e5c8249

File tree

6 files changed

+222
-0
lines changed

6 files changed

+222
-0
lines changed

docs/apis/migration-perm-guidance.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: Migration permission guidance
3+
ms.date: 06/02/2020
4+
ms.author: jhendr
5+
author: JoanneHendrickson
6+
manager: pamgreen
7+
audience: ITPro
8+
f1.keywords:
9+
- NOCSH
10+
ms.topic: conceptual
11+
ms.service: sharepoint-online
12+
localization_priority: Priority
13+
ms.collection:
14+
- SPMigration
15+
- M365-collaboration
16+
search.appverid: MET150
17+
description: "Migration permission guidance"
18+
---
19+
# Migration permission guidance
20+
21+
You need to be aware of three key numbers as you plan your migration to OneDrive or SharePoint especially when you have a hierarchy of deeply nested folders. They are: (1) the number of SharePoint unique permission scopes, (2) the number of role assignments, and (3) the total number of items in a list or library.
22+
23+
## Permissions: Inherited and unique
24+
25+
Inherited permissions are set as the default at the root site collection level and are applied to the other locations and objects within that site collection. Unique permissions are all other permissions that differ (or “break”) from what is set at the root. In SharePoint, you can set unique permissions all the way down to the item level.
26+
27+
Each time you break inheritance by granting access to a new user account or group at any level in a site, even on a single item, you are creating a new unique security “scope” ID. That scope is counted as a unique permission towards the total limit. A library (or list) cannot have greater than 50,000 unique security scopes.
28+
29+
![Site hierarchy](../images/hierarchy-perms.png)
30+
31+
When the number of unique security scopes exceeds the value of the list view threshold, added SQL server round trips take place that can affect performance.
32+
When migrating, we recommend that you have less than 5,000 unique scopes per library.
33+
34+
## Role assignments
35+
36+
A role assignment is a mapping between a user, a SharePoint object (Web, list, file) and a role (Design, Full Control, Contribute, etc.). The role assignment ties together the role definition (permission level) with the specific user or group, and the scope that that permission level will be applied to (such as list, folder, item).
37+
38+
There is a role assignment limit of 5,000 per security scope.
39+
40+
## Item limits
41+
42+
When a library (or list) contains more than 100,000 items (files and folders or list items), you cannot break permissions inheritance on the list itself. There is a limit of 100,000 items that can be updated or removed as a part of creating a new SharePoint security scope.
43+
44+
If you are migrating a structure that has more than 100,000 children (such as files, folders, lists, or other object types), you need to restructure the migration by importing security in multiple phases to avoid exceeding this limit. Any VROOM invite, REST share link, or any other permission-modifying function call will trigger an HTTP 429 throttle if the threshold is reached. Permissions will not be updated. Unlike other throttles, waiting and trying again will not resolve the situation as you have reached a hard limit of 100,000.
45+
To learn more about the service limits in SharePoint for Microsoft 365, see [SharePoint Limits](https://docs.microsoft.com/en-us/office365/servicedescriptions/sharepoint-online-service-description/sharepoint-online-limits#items-in-lists-and-libraries).
46+
47+
## Folders containing fewer than 100,000 items
48+
49+
If your library (or list) has fewer than 100,000 items, and you have less than 50,000 unique scopes, you can migrate using the migration API and apply unique scopes to create folders with less 100K items to break inheritance as needed.
50+
51+
## Folders containing more than 100,000 items
52+
53+
If you have a folder with more than 100,000 items, we recommend one of the following approaches. Determine how many items are in your source or root folder, including lists or other object types. Scan and determine which folder structures have greater than 100,000 items.
54+
55+
### Method 1: Restructure the source layout
56+
The first option is to restructure your *source* layout.
57+
58+
For example, divide a single folder of 250,000 items into four folders at the root so each folder has less than 100,000 items. There is still “room to grow”, presuming users will continue to add content and make changes here.
59+
60+
Make sure that there are no more than 50,000 unique scopes in the structure: ideally less than 5,000.
61+
62+
In this example, at the source, break up the structure into four folders, A, B, C, and D, each having less than 100,000 items. Then perform the migration. See the illustration below.
63+
64+
![Hierarchy ABCD](../images/hierarchy-abcd.png)
65+
66+
>[!NOTE]
67+
>There are other limits that must be considered during migration. See [SharePoint Limits](https://docs.microsoft.com/en-us/office365/servicedescriptions/sharepoint-online-service-description/sharepoint-online-limits#items-in-lists-and-libraries) for details.
68+
69+
### Method 2: Create your destination layout to avoid exceeding limits
70+
The alternate approach is to keep your source layout, applying unique scopes at the destination before migration.
71+
72+
**Example:** Your source folder has 250,000 items within it. At your target ___location, create folders A, B, C, and D and apply the unique scopes and scope ID. This will break inheritance. Then proceed with your content migration.
73+
If you do not want your end users to share items until migration is completed, use the Migration API to migrate the content & scopes, but set the scope to NULL to prevent any use.
74+
After all the content and incremental migrations are completed, apply the proper scope.
75+
76+
After the incremental migration has completed, and only if you previously set the scope to NULL, you can reapply the unique scope for folders A, B, C, D separately. When you reapply the scope, evaluate your folder size starting at the lowest level of hierarchy.
77+
78+
## Other Sharing/Permission related considerations
79+
80+
The REST share link or any other permission-modifying function will not take effect if you attempt to update the permission on a file that is checked out by a user.
81+
Finally, if a SharePoint site or OneDrive ___location is being actively used during migration, the existing permissions applied on that site, user or document will be enforced.
82+
83+
**Example:** If you attempt to modify the permission on a site that only allows access to existing users already defined on the site, and the user you are trying to add to a file or folder does not already have permissions on the site itself, the permission call (e.g. VROOM Invite) will not be able to make the modification.
84+

docs/apis/spod-copy-move-api.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: Microsoft 365 Copy and Move API (CreateCopyJobs)
3+
ms.date: 06/02/2020
4+
ms.author: jhendr
5+
author: JoanneHendrickson
6+
manager: pamgreen
7+
audience: ITPro
8+
f1.keywords:
9+
- NOCSH
10+
ms.topic: article
11+
ms.service: sharepoint-online
12+
localization_priority: Priority
13+
ms.collection:
14+
- SPMigration
15+
- M365-collaboration
16+
search.appverid: MET150
17+
description: "Microsoft 365 Copy and Move API (CreateCopyJobs)"
18+
---
19+
# Microsoft 365 Copy and Move API (CreateCopyJobs)
20+
21+
>[!IMPORTANT]
22+
>SharePoint & OneDrive Copy and Move API replaces the CreateCopyJob API. The CreateCopyJob API has been deprecated.
23+
24+
25+
The following API is based on the use of the SharePoint Client Side Object Model (CSOM). We recommend using [NuGet](https://www.nuget.org/) packages when you reference CSOM in your solution.
26+
27+
You can find the latest version of the SharePoint Online CSOM package from the [NuGet library](https://www.nuget.org/) using the ID *Microsoft.SharePointOnline.CSOM*.
28+
29+
>[!IMPORTANT]
30+
>Learn more about [limitations](#limitations) of this API before you begin.
31+
32+
33+
## Method
34+
35+
### CreateCopyJobs
36+
37+
This method creates a new copy or move job that lets you copy or move a file or folder from one site in SharePoint, OneDrive, or Teams, to another site.
38+
39+
#### Syntax
40+
41+
`public List<SPCopyMigrationInfo> CreateCopyJobs(Uri[] exportObjectUris, Uri destinationUri, SPCopyMigrationOptions options)`
42+
43+
44+
#### Parameters
45+
46+
|Parameter|Description|
47+
|:-----|:-----|
48+
|exportObjectUris|The URL of a file or folders in a list that you want to copy or move|
49+
|destinationUri|URL for the destination ___location.|
50+
51+
##### SPCopyMigrationOptions
52+
53+
54+
`public bool IsMoveMode { get; set; }`
55+
56+
>[!IMPORTANT]
57+
>By default, this is set to copy. For a move operation, set this parameter to true.
58+
59+
60+
`public bool IgnoreVersionHistory { get; set; }`
61+
62+
If not specified, the version history will be ignored and not moved to the destination.
63+
64+
65+
`public bool AllowSchemaMismatch { get; set; }`
66+
67+
This allows the item to move even if the target has a mismatched schema definition from the source list.
68+
69+
70+
`public bool AllowSmallerVersionLimitOnDestination { get; set; }`
71+
72+
This allows the move to take place if the target file has older version. By default it’s disallowed to prevent data loss.
73+
74+
75+
`public SPMigrationNameConflictBehavior NameConflictBehavior { get; set; }`
76+
77+
If a name conflict occurs at the target site, the default reports a failure.
78+
79+
80+
`public bool IncludeItemPermissions { get; set; }`
81+
82+
Reserved for interal use only.
83+
84+
85+
`public SPMoveAndShareFileInfo MoveAndShareFileInfo { get; set; }`
86+
87+
Reserved for internal use only.
88+
89+
90+
`public bool BypassSharedLock { get; set; }`
91+
92+
This indicates whether a file with a share lock can still be moved in a move job. If you want to move a file that is locked, you need to set this.
93+
94+
95+
`public string[] ClientEtags { get; set; }`
96+
97+
If set, and the source eTag doesn’t match the eTag specified, the copy and move won’t take place. If left NULL, no check will take place.
98+
99+
100+
`public bool MoveButKeepSource { get; set; }`
101+
102+
Once set, this move operation is similar to copy. The file will move to destination, but the source content will not be deleted. If set, this will make a copy with the version history and preserve the original metadata. No source item deletions occurs at the end.
103+
104+
>[!NOTE]
105+
>This is not like the normal copy, which only copies the most recent major version and doesn't maintain all the metadata.
106+
107+
108+
`public bool ExcludeChildren { get; set; }`
109+
110+
For this operation, only the root level folder of the URL is copied. The sub-folders or files within the folder will not be moved or copied.
111+
112+
113+
### Output
114+
115+
|Output parameter|Description|
116+
|:-----|:-----|
117+
|JobID/GUID|Return a unique Job ID associated with this asynchronous read|
118+
|SourceListItemUniqueIds|Return the source |
119+
|JobQueueUri|URL for accessing Azure queue used for returning notification of copy and move process|
120+
|EncryptionKey| AES256CBC encryption key used to decrypt messages from job/manifest queue|
121+
122+
123+
`public Uri JobQueueUri { get; set; }`
124+
125+
The reporting features are the same as they are for CreateMigrationJob. Logging tracks the status of the createCopyJobs. By default, blob queue permissions and settings are set to "all access”. It gives the job status as follows: job start, job end, and job error information.
126+
127+
128+
## Limitations
129+
Currently, the following limitations are:
130+
131+
|What|Limitation|
132+
|:-----|:-----|
133+
|File size| A file must be less than 2 GB.|
134+
|Number of items| No more than 30,000 items in a job.|
135+
|Total size of job| Job size not to exceed 100 GB.|
136+
137+
138+

hierarchy-ABCD.png

8.62 KB
Loading

hierarchy-perms.png

8.11 KB
Loading

images/hierarchy-ABCD.png

8.62 KB
Loading

images/hierarchy-perms.png

8.11 KB
Loading

0 commit comments

Comments
 (0)