List resources

Namespace: microsoft.graph

Retrieve a list of accessPackageResource objects in an accessPackageCatalog.

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

HTTP request

GET /identityGovernance/entitlementManagement/catalogs/{id}/resources

Optional query parameters

This method supports OData query parameters to help customize the response. For example, to retrieve the access package resource scopes and environments for each resource, include $expand=scopes,environment in the query. To retrieve the available roles of a resource and its scope, include $expand=roles,scopes. 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 accessPackageResource objects in the response body.

Examples

Example 1: List all resources in a catalog

Request

The following is an example of the request, using $expand to return resource scopes of each resource.

GET https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/catalogs/{id}/resources?$expand=scopes

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

{
  "value": [
    {
      "id": "400279ff-8e85-4dcf-b1d6-d3a6be372951",
      "displayName": "Faculty cafeteria ordering",
      "description": "Example application",
      "originId": "2f1099a6-d4fc-4cc9-a0ef-ddd3f1bf0b7e",
      "scopes": [
          {
              "id": "452d78a7-69a5-482d-a82f-859a5169c55e",
              "displayName": "Root",
              "description": "Root Scope",
              "originId": "2f1099a6-d4fc-4cc9-a0ef-ddd3f1bf0b7e",
              "originSystem": "AadApplication",
              "isRootScope": true
          }
      ]
    }
  ]
}

Example 2: Retrieve the roles and scopes of a single resource in a catalog

Request

The following is an example of the request, using $expand to return the roles and scopes of a single resource. The resource must already be present in the catalog.

GET https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/catalogs/{catalogId}/resources?$expand=roles,scopes&$filter=id eq '{resourceId}'

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

{
  "value": [
    {
      "id": "400279ff-8e85-4dcf-b1d6-d3a6be372951",
      "displayName": "Faculty cafeteria ordering",
      "description": "Example application",
      "originId": "2f1099a6-d4fc-4cc9-a0ef-ddd3f1bf0b7e",
      "roles": [
          {
              "id": "5fc34d75-926c-458e-9967-060691c7f4ae",
              "displayName": "admin",
              "description": "Administrator in the application",
              "originSystem": "AadApplication",
              "originId": "2cab8bf6-3fa2-4cc5-b0a7-a401af9f6197"
           }
      ],
      "scopes": [
          {
              "id": "452d78a7-69a5-482d-a82f-859a5169c55e",
              "displayName": "Root",
              "description": "Root Scope",
              "originId": "2f1099a6-d4fc-4cc9-a0ef-ddd3f1bf0b7e",
              "originSystem": "AadApplication",
              "isRootScope": true
          }
      ]
    }
  ]
}

Example 3: Retrieve the roles and scopes of a single resource in a catalog by origin ID

Request

The following is an example of the request, using $expand to return the roles and scopes of a single resource. The filter uses the originId property of the accessPackageResource to refer to the identifier in the origin system. If the resource in the catalog is based on a group, this value would be the id of that group.

GET https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/catalogs/{catalogId}/resources?$expand=roles,scopes&$filter=originId eq '0282e19d-bf41-435d-92a4-99bab93af305'

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

{
  "value": [
    {
      "id": "b16e0e71-17b4-4ebd-a3cd-8a468542e418",
      "displayName": "example group",
      "description": "a group whose members are to be assigned via an access package",
      "originId": "0282e19d-bf41-435d-92a4-99bab93af305",
      "originSystem": "AadGroup",
      "createdDateTime": "2019-09-13T01:06:14.797Z",
      "roles": [
        {
          "id": "748f8431-c7c6-404d-8564-df67aa8cfc5e",
          "displayName": "Member",
          "originSystem": "AadGroup",
          "originId": "Member_0282e19d-bf41-435d-92a4-99bab93af305"
        }
      ],
      "scopes": [
        {
          "id": "83b3e3e9-c8b3-481b-ad80-53e29d1eda9c",
          "displayName": "Root",
          "description": "Root Scope",
          "originId": "0282e19d-bf41-435d-92a4-99bab93af305",
          "originSystem": "AadGroup",
          "isRootScope": true
        }
      ]
    }
  ]
}