Muokkaa

Jaa


administrativeUnit: delta

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 newly created, updated, or deleted administrativeUnits without having to perform a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details.

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

Important

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

  • Directory Readers - Read basic properties and members of administrative units
  • Global Reader - Read all properties of administrative units, including members
  • Privileged Role Administrator - Fully manage administrative units, including members, but excluding restricted administrative units. For more information, see Restricted management administrative units in Microsoft Entra ID

HTTP request

To begin tracking changes, you make a request that includes the delta function on the administrativeUnit resource.

GET /administrativeUnits/delta

Query parameters

Tracking changes incurs a round of one or more delta function calls. If you use any query parameter (other than $deltatoken and $skiptoken), you must specify it in the initial delta request. Microsoft Graph automatically encodes any specified parameters into the token portion of the @odata.nextLink or @odata.deltaLink URL provided in the response. You only need to specify any query parameters once up front. In subsequent requests, copy and apply the @odata.nextLink or @odata.deltaLink URL from the previous response. That URL already includes the encoded parameters.

Query parameter Type Description
$deltatoken string A state token returned in the @odata.deltaLink URL of the previous delta function call for the same resource collection, indicating the completion of that round of change tracking. Save and apply the entire @odata.deltaLink URL including this token in the first request of the next round of change tracking for that collection.
$skiptoken string A state token returned in the @odata.nextLink URL of the previous delta function call, indicating there are further changes to be tracked in the same resource collection.

Optional query parameters

This method supports the following OData query parameters to help customize the response:

  • You can use a $select query parameter as in any GET request to specify only the properties your need for best performance. The id property is always returned.

  • There is limited support for $filter:

    • The only supported $filter expression is for tracking changes for specific resources, by their ID: $filter=id+eq+{value} or $filter=id+eq+{value1}+or+id+eq+{value2}. The number of IDs you can specify is limited by the maximum URL length.

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 200 OK response code and an administrativeUnit collection object in the response body. The response also includes a @odata.nextLink URL or a @odata.deltaLink URL.

  • If a @odata.nextLink URL is returned, there are additional pages of data to be retrieved in the session. The administrativeUnit continues making requests using the @odata.nextLink URL until a @odata.deltaLink URL is included in the response.

  • If a @odata.deltaLink URL is returned, there is no more data about the existing state of the resource to be returned. Persist and use the @odata.deltaLink URL to learn about changes to the resource in the future.

For details and an example, see Using delta query and Get incremental changes for users.

Example

Request

GET https://graph.microsoft.com/beta/administrativeUnits/delta

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#administrativeunits",
  "@odata.nextLink":"https://graph.microsoft.com/beta/administrativeunits/delta?$skiptoken=pqwSUjGYvb3jQpbwVAwEL7yuI3dU1LecfkkfLPtnIjsXoYQp_dpA3cNJWc",
  "value": [
    {
      "displayName": "Management Fast Track",
      "visibility": null,
      "extension_fe2174665583431c953114ff7268b7b3_Education_ObjectType": "School",
      "extension_fe2174665583431c953114ff7268b7b3_Education_StateId": "WA",
      "extension_fe2174665583431c953114ff7268b7b3_Education_Address": "2 Microsoft Way",
      "extension_fe2174665583431c953114ff7268b7b3_Education_City": "Redmond",
      "extension_fe2174665583431c953114ff7268b7b3_Education_State": "WA",
      "extension_fe2174665583431c953114ff7268b7b3_Education_Country": "US",
      "extension_fe2174665583431c953114ff7268b7b3_Education_Zip": "98052",
      "extension_fe2174665583431c953114ff7268b7b3_Education_Phone": "555-123-4567",
      "extension_fe2174665583431c953114ff7268b7b3_Education_SyncSource": "SIS",
      "extension_fe2174665583431c953114ff7268b7b3_Education_SyncSource_SchoolId": "10002",
      "extension_fe2174665583431c953114ff7268b7b3_Education_SchoolPrincipalSyncSourceId": "14008",
      "extension_fe2174665583431c953114ff7268b7b3_Education_SchoolPrincipalName": "Amy Roebuck",
      "extension_fe2174665583431c953114ff7268b7b3_Education_SchoolPrincipalEmail": "aroebuck@principal.edu",
      "extension_fe2174665583431c953114ff7268b7b3_Education_SchoolZone": "1",
      "id": "8a07f5a8-edc9-4847-bbf2-dde106594bf4",
      "members@delta": [
        {
            "@odata.type": "#microsoft.graph.user",
            "id": "b66ecf79-a093-4d51-86e0-efcc4531f37a"
        },
        {
            "@odata.type": "#microsoft.graph.user",
            "id": "5bde3e51-d13b-4db1-9948-fe4b109d11a7"
        },
        {
            "@odata.type": "#microsoft.graph.group",
            "id": "801f2093-de7e-4883-a786-8a5f30874ff4"
        },
        {
            "@odata.type": "#microsoft.graph.group",
            "id": "7e4ec76c-8276-43ef-ba10-9aaa197cb212"
        },
        {
            "@odata.type": "#microsoft.graph.user",
            "id": "f5289423-7233-4d60-831a-fe107a8551cc"
        },
        {
            "@odata.type": "#microsoft.graph.user",
            "id": "48d31887-5fad-4d73-a9f5-3c356e68a038"
        },
        {
            "@odata.type": "#microsoft.graph.user",
            "id": "87d349ed-44d7-43e1-9a83-5f2406dee5bd"
        },
        {
            "@odata.type": "#microsoft.graph.user",
            "id": "c03e6eaa-b6ab-46d7-905b-73ec7ea1f755"
        }
      ]
  }
  ]
}