Edit

Share via


List configurationSnapshotJobs

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 list of the configurationSnapshotJob objects and their properties.

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

HTTP request

GET /admin/configurationManagement/configurationSnapshotJobs

Optional query parameters

This method supports the $select, $filter, $orderBy, and $top 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 collection of configurationSnapshotJob objects in the response body.

Examples

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/admin/configurationManagement/configurationSnapshotJobs

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#admin/configurationManagement/configurationSnapshotJobs",
  "@microsoft.graph.tips": "This request only returns a subset of the resource's properties. Your app will need to use $select to return non-default properties. To find out what other properties are available for this resource see https://dori-uw-1.kuma-moon.com/graph/api/resources/configurationSnapshotJob",
  "value": [
    {
      "id": "1a14c735-e01b-4c6e-a0e9-02ecbe7ad832",
      "displayName": "Snapshot Creation 1",
      "description": "Snapshot Description",
      "tenantId": "2fcf1c68-b412-4c85-bfb2-cb20152a6843",
      "status": "notStarted",
      "resources": [
        "microsoft.exchange.sharedmailbox",
        "microsoft.exchange.transportrule"
      ],
      "createdDateTime": "2025-02-18T15:33:51.9823159Z",
      "completedDateTime": "0001-01-01T00:00:00Z",
      "resourceLocation": "",
      "createdBy": {
        "user": {
          "id": "98ceffcc-7c54-4227-8844-835af5a023ce",
          "displayName": "Test Contoso User"
        }
      }
    },
    {
      "id": "c91a1470-acc9-4585-bc03-522ae898f82f",
      "displayName": "Snapshot Creation Demo 1",
      "description": "Snapshot Description",
      "tenantId": "2fcf1c68-b412-4c85-bfb2-cb20152a6843",
      "status": "notStarted",
      "resources": [
        "microsoft.exchange.sharedmailbox",
        "microsoft.exchange.transportrule"
      ],
      "createdDateTime": "2025-02-18T15:43:59.7935268Z",
      "completedDateTime": "0001-01-01T00:00:00Z",
      "resourceLocation": "",
      "createdBy": {
        "user": {
          "id": "98ceffcc-7c54-4227-8844-835af5a023ce",
          "displayName": "Test Contoso User"
        }
      }
    }
  ]
}

Example 2: Error response for failed snapshot jobs

The following example shows an error response when snapshot jobs encounter failures during execution.

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/admin/configurationManagement/configurationSnapshotJobs

Response

The following example shows the response.

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

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#admin/configurationManagement/configurationSnapshotJobs",
  "@microsoft.graph.tips": "This request only returns a subset of the resource's properties. Your app will need to use $select to return non-default properties. To find out what other properties are available for this resource see https://dori-uw-1.kuma-moon.com/graph/api/resources/configurationSnapshotJob",
  "value": [
    {
      "@odata.type": "#microsoft.graph.configurationSnapshotJob",
      "id": "f2a8c9d1-4e5f-4b3a-9c8d-1e2f3a4b5c6d",
      "displayName": "Failed Snapshot",
      "description": "Snapshot that failed due to authentication issues",
      "tenantId": "2fcf1c68-b412-4c85-bfb2-cb20152a6843",
      "status": "failed",
      "resources": [
        "microsoft.exchange.sharedmailbox",
        "microsoft.exchange.transportrule"
      ],
      "createdDateTime": "2025-02-18T15:33:51.9823159Z",
      "completedDateTime": "2025-02-18T15:35:12.4561234Z",
      "resourceLocation": "",
      "errorDetails": [
        "Authentication failed: Unable to authenticate with the Microsoft Exchange service.",
        "Resource access denied: Insufficient permissions to access transport rules."
      ],
      "createdBy": {
        "user": {
          "id": "98ceffcc-7c54-4227-8844-835af5a023ce",
          "displayName": "Test Contoso User"
        }
      }
    },
    {
      "@odata.type": "#microsoft.graph.configurationSnapshotJob",
      "id": "a3b4c5d6-7e8f-9a0b-1c2d-3e4f5a6b7c8d",
      "displayName": "Partially Successful Snapshot",
      "description": "Snapshot with partial success",
      "tenantId": "2fcf1c68-b412-4c85-bfb2-cb20152a6843",
      "status": "partiallySuccessful",
      "resources": [
        "microsoft.exchange.sharedmailbox",
        "microsoft.exchange.accepteddomain",
        "microsoft.exchange.transportrule"
      ],
      "createdDateTime": "2025-02-18T16:00:00.0000000Z",
      "completedDateTime": "2025-02-18T16:05:30.1234567Z",
      "resourceLocation": "https://storage.example.com/snapshots/a3b4c5d6",
      "errorDetails": [
        "Warning: Some transport rules could not be exported due to configuration restrictions."
      ],
      "createdBy": {
        "user": {
          "id": "98ceffcc-7c54-4227-8844-835af5a023ce",
          "displayName": "Test Contoso User"
        }
      }
    }
  ]
}