Skip to content

Latest commit

 

History

History
133 lines (96 loc) · 4.42 KB

File metadata and controls

133 lines (96 loc) · 4.42 KB
title Create session
description Create a new session in Security Copilot.
author spunukol
ms.date 07/17/2025
ms.localizationpriority medium
ms.subservice security-copilot
doc_type apiPageType

Create session

Namespace: microsoft.graph.security.securityCopilot

[!INCLUDE beta-disclaimer]

Create a new session in Security Copilot.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

[!INCLUDE rbac-security-copilot-apis]

HTTP request

POST /security/securityCopilot/workspaces/{workspaceId}/sessions

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the microsoft.graph.security.securityCopilot.session object.

You can specify the following properties when creating a session.

Property Type Description
displayName String Display Name of the session. Required.

Response

If successful, this method returns a 201 Created response code and a microsoft.graph.security.securityCopilot.session object in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/security/securityCopilot/workspaces/default/sessions
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.security.securityCopilot.session",
  "displayName": "Who am I"
}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#security/securityCopilot/workspaces('default')/sessions/$entity",
    "id": "71a8abb6-ce18-496c-a8d4-4d0f51986c3e",
    "createdDateTime": "2025-09-17T01:03:14.07343Z",
    "lastModifiedDateTime": "2025-09-17T01:03:14.07343Z",
    "displayName": "Who am I"
}