Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph.security.caseManagement
Important
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.
Create a concrete external resource relation for a case.
This API is available in the following national cloud deployments.
| Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
|---|---|---|---|
| ✅ | ❌ | ❌ | ❌ |
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.
| Permission type | Least privileged permissions | Higher privileged permissions |
|---|---|---|
| Delegated (work or school account) | CaseManagement.ReadWrite.All | Not available. |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | CaseManagement.ReadWrite.All | Not available. |
Important
For delegated access using work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that grants the permissions required for this operation. This API supports the following built-in roles:
- Global Reader
- Security Reader
- Security Operator
- Security Administrator
HTTP request
POST /security/caseManagement/cases/{caseId}/relations
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 a concrete microsoft.graph.security.caseManagement.relation object. The base relation type is abstract and can't be created. Include @odata.type with one of the following supported types:
The required subtype-specific properties are:
| Concrete relation type | Required subtype-specific properties |
|---|---|
| incidentRelation | None. |
| recommendationRelation | recommendationType |
| workspaceIndicatorRelation | subscriptionId |
You can also supply the following properties as applicable to the selected concrete type.
| Property | Type | Description |
|---|---|---|
| @odata.type | String | The OData type of the concrete relation. The supported values are #microsoft.graph.security.caseManagement.incidentRelation, #microsoft.graph.security.caseManagement.recommendationRelation, and #microsoft.graph.security.caseManagement.workspaceIndicatorRelation. Required. |
| recommendationType | String | The recommendation type associated with the linked recommendation. Required for recommendationRelation. |
| relatedResourceId | String | The identifier of the related external resource. Optional. |
| resourceGroupName | String | The Azure resource group name. Applies to recommendationRelation and workspaceIndicatorRelation. |
| subscriptionId | String | The Azure subscription identifier. Required for workspaceIndicatorRelation and supported for recommendationRelation. |
| workspaceName | String | The Log Analytics workspace name. Applies to workspaceIndicatorRelation. |
Response
If successful, this method returns a 201 Created response code and a microsoft.graph.security.caseManagement.relation object in the response body.
Examples
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/security/caseManagement/cases/{caseId}/relations
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.security.caseManagement.incidentRelation",
"relatedResourceId": "987654321"
}
Response
The following example shows the response.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.security.caseManagement.incidentRelation",
"id": "790478d8-6402-8452-4584-5d32e6acf31a",
"createdDateTime": "2026-05-20T11:12:28Z",
"createdBy": "user@contoso.com",
"lastModifiedDateTime": "2026-05-20T11:18:45Z",
"lastModifiedBy": "user@contoso.com",
"relatedResourceId": "987654321"
}