編輯

共用方式為


Get customSecurityAttributeAudit

Namespace: microsoft.graph

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.

Get a specific audit log generated by activities related to custom security attribute management in Microsoft Entra ID.

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) CustomSecAttributeAuditLogs.Read.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application CustomSecAttributeAuditLogs.Read.All Not available.

Important

In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following privileged roles are supported for this operation.

  • Attribute Log Reader
  • Attribute Log Administrator

By default, Global Administrator and other administrator roles do not have permissions to read custom security attribute audit logs.

HTTP request

GET /auditLogs/customSecurityAttributeAudits/{customSecurityAttributeAuditId}

Optional query parameters

This method doesn't support any OData query parameters to help customize the response. For general information, see OData query parameters.

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a customSecurityAttributeAudit object in the response body.

Examples

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/auditLogs/customSecurityAttributeAudits/Directory_46ef8262-896f-4a39-9666-db82e22e778b_GXP3K_386490241

Response

The following example shows the response.

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

HTTP/1.1 200 OK
Content-Type: application/json

{
   "@odata.context": "https://graph.microsoft.com/beta/$metadata#auditLogs/customSecurityAttributeAudits/$entity",
   "id": "Directory_46ef8262-896f-4a39-9666-db82e22e778b_GXP3K_386490241",
   "category": "AttributeManagement",
   "correlationId": "f3b07799-da67-4a79-bb56-eed7ba2ca404",
   "result": "success",
   "resultReason": "",
   "activityDisplayName": "Update an attribute set",
   "activityDateTime": "2023-07-27T00:36:52.014638Z",
   "loggedByService": "Core Directory",
   "operationType": "Update",
   "userAgent": null,
   "initiatedBy": {
       "app": null,
       "user": {
           "id": "573bfb22-436c-40c7-82c2-d1b67677c33c",
           "displayName": null,
           "userPrincipalName": "admin1@contoso.com",
           "ipAddress": "{ipAddress}",
           "userType": null,
           "homeTenantId": null,
           "homeTenantName": null
       }
   },
   "targetResources": [
       {
           "id": "dd707ff2-fd98-4ce5-9733-eafa781d3b12",
           "displayName": "DesignTest",
           "type": "Other",
           "userPrincipalName": null,
           "groupType": null,
           "modifiedProperties": [
               {
                   "displayName": "MaxAttributesPerSet",
                   "oldValue": "[25]",
                   "newValue": "[20]"
               },
               {
                   "displayName": "Included Updated Properties",
                   "oldValue": null,
                   "newValue": "\"MaxAttributesPerSet\""
               }
           ]
       }
   ],
   "additionalDetails": [
       {
           "key": "User-Agent",
           "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0"
       }
   ]
}