Skip to content

Commit f8ca3ad

Browse files
committed
Fixing migration service
1 parent bf00f79 commit f8ca3ad

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
## How to mark the OneNote folder
40+
41+
The CSOM will mark the *HTML_x0020_File_x0020_Type* field of the folder on SharePoint Online as *OneNote.Notebook*.
42+
43+
The marking must be done ONLY on the top-level OneNote folder candidate in the file hierarchy.
44+
45+
Sample code:
46+
47+
```c#
48+
49+
List list = context.web.Lists.GetById({listid});
50+
ListItem item = list.GetItemByUniqueId({itemid});
51+
Item[“HTML_x0020_File_x0020_Type”] =OneNote.Notebook”;
52+
Item.SystemUpdate();
53+
Context.ExecuteQuery();
54+
55+
```

docs/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@
343343
items:
344344
- name: Migration Guidance for ISVs
345345
href: apis/migration-isv-guidance.md
346+
- name: Migrating OneNote folders
347+
href: apis/onenote-migration-service.md
346348
- name: Migration API
347349
items:
348350
- name: Import Migration API

0 commit comments

Comments
 (0)