この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
Notes.Create、Notes.ReadWrite、Notes.ReadWrite.All
委任 (個人用 Microsoft アカウント)
Notes.Create、Notes.ReadWrite
アプリケーション
Notes.ReadWrite.All
HTTP 要求
POST /me/onenote/pages/{id}/copyToSection
POST /users/{id | userPrincipalName}/onenote/pages/{id}/copyToSection
POST /groups/{id}/onenote/pages/{id}/copyToSection
要求ヘッダー
名前
型
説明
Authorization
string
ベアラー {token}。必須。
Content-Type
string
application/json
要求本文
要求本文で、操作に必要なパラメーターを含む JSON オブジェクトを指定します。
パラメーター
型
説明
groupId
文字列型 (String)
コピー先のグループの ID。 Microsoft 365 グループにコピーする場合にのみ使用します。
POST https://graph.microsoft.com/v1.0/me/onenote/pages/{id}/copyToSection
Content-type: application/json
{
"id": "id-value",
"groupId": "groupId-value"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var id = "id-value";
var groupId = "groupId-value";
await graphClient.Me.Onenote.Pages["{onenotePage-id}"]
.CopyToSection(id,groupId,null,null)
.Request()
.PostAsync();
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.New()
id := "id-value"
requestBody.SetId(&id)
groupId := "groupId-value"
requestBody.SetGroupId(&groupId)
onenotePageId := "onenotePage-id"
result, err := graphClient.Me().Onenote().PagesById(&onenotePageId).CopyToSection(onenotePage-id).Post(requestBody)
Import-Module Microsoft.Graph.Users.Actions
$params = @{
Id = "id-value"
GroupId = "groupId-value"
}
# A UPN can also be used as -UserId.
Copy-MgUserOnenotePageToSection -UserId $userId -OnenotePageId $onenotePageId -BodyParameter $params