Skip to content

Commit bf00f79

Browse files
JoanneHendricksonVesaJuvonen
authored andcommitted
Create onenote-migration-service (SharePoint#5108)
article for new onenote conversion service on SPO side
1 parent 04932eb commit bf00f79

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

Diff for: onenote-migration-service

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Migrating OneNote folders
3+
ms.author: jhendr
4+
author: JoanneHendrickson
5+
manager: pamgreen
6+
audience: Dev
7+
ms.topic: article
8+
ms.service: sharepoint-online
9+
localization_priority: Priority
10+
ms.collection:
11+
- SPMigration
12+
- M365-collaboration
13+
search.appverid: MET150
14+
description: "Migrating OneNote folders using the SPO OneNote converting service"
15+
---
16+
# Migrating OneNote folders
17+
18+
When bringing **OneNote** notebooks from outside of SharePoint Online (SPO) into the service, you are required to convert ("shred") the file for it to be supported properly in the service. The OneNote team now has a OneNote converting service in SPO. It is now possible to mark **OneNote** notebooks that are being migrated, to be converted.
19+
20+
### Example
21+
22+
The following example shows SPMT using the SPO OneNote converting service, which is running in SPO background.
23+
24+
![OneNote migration process](media/onenote-migration-flow.png)
25+
26+
## Algorithm for checking whether to mark the folder as OneNote folder
27+
28+
For a normal folder, we use the following algorithm to determine whether it should be marked as **OneNote** folder or not.
29+
30+
If any of the sub-folders or descendant sub-folders are NOT considered a OneNote folder, then this folder is NOT considered as a OneNote folder.
31+
32+
If any file under this folder has an extension other than the following, it is NOT considered as a OneNote folder.
33+
- .one
34+
- .onetoc2
35+
- .onetemp
36+
37+
If the folder does not contain one .onetoc2 file, it is NOT considered to be a **OneNote** folder.
38+
39+
40+
## How to mark the OneNote folder
41+
42+
The CSOM will mark the *HTML_x0020_File_x0020_Type* field of the folder on SharePoint Online as *OneNote.Notebook*.
43+
44+
The marking must be done ONLY on the top-level OneNote folder candidate in the file hierarchy.
45+
46+
Sample code:
47+
48+
```XML
49+
50+
List list = context.web.Lists.GetById({listid});
51+
ListItem item = list.GetItemByUniqueId({itemid});
52+
Item[“HTML_x0020_File_x0020_Type”] = “OneNote.Notebook”;
53+
Item.SystemUpdate();
54+
Context.ExecuteQuery();
55+
56+
```
57+
58+

0 commit comments

Comments
 (0)