APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Copies a section to a specific section group.
For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
POST /me/onenote/sections/{id}/copyToSectionGroup
POST /users/{id | userPrincipalName}/onenote/sections/{id}/copyToSectionGroup
POST /groups/{id}/onenote/sections/{id}/copyToSectionGroup
POST /sites/{id}/onenote/sections/{id}/copyToSectionGroup
Request headers
Name
Type
Description
Authorization
string
Bearer {token}. Required.
Content-Type
string
application/json
Request body
In the request body, provide a JSON object that contains the parameters that your operation needs.
Parameter
Type
Description
siteCollectionId
String
The id of the SharePoint site to copy to. Use only when copying to a SharePoint site.
siteId
String
The id of the SharePoint web to copy to. Use only when copying to a SharePoint site.
groupId
String
The id of the group to copy to. Use only when copying to a Microsoft 365 group.
id
String
Required. The id of the destination section group.
renameAs
String
The name of the copy. Defaults to the name of the existing item.
Response
If successful, this method returns a 202 Accepted response code and an Operation-Location header. Poll the Operation-Location endpoint to get the status of the copy operation.
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var id = "id-value";
var groupId = "groupId-value";
var renameAs = "renameAs-value";
await graphClient.Me.Onenote.Sections["{onenoteSection-id}"]
.CopyToSectionGroup(id,groupId,renameAs,null,null)
.Request()
.PostAsync();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
//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)
renameAs := "renameAs-value"
requestBody.SetRenameAs(&renameAs)
onenoteSectionId := "onenoteSection-id"
result, err := graphClient.Me().Onenote().SectionsById(&onenoteSectionId).CopyToSectionGroup(onenoteSection-id).Post(requestBody)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Import-Module Microsoft.Graph.Users.Actions
$params = @{
Id = "id-value"
GroupId = "groupId-value"
RenameAs = "renameAs-value"
}
# A UPN can also be used as -UserId.
Copy-MgUserOnenoteSectionToSectionGroup -UserId $userId -OnenoteSectionId $onenoteSectionId -BodyParameter $params
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.