List attributeSets

名前空間: microsoft.graph

重要

Microsoft Graph のバージョンの /beta API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 API が v1.0 で使用できるかどうかを確認するには、 バージョン セレクターを使用します。

attributeSet オブジェクトとその プロパティの 一覧を取得します。

アクセス許可

この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。

アクセス許可の種類 アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント) CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All
委任 (個人用 Microsoft アカウント) サポートされていません。
アプリケーション CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All

サインインしているユーザーには、次のいずれかのディレクトリ ロールを割り当てる 必要があります

  • 属性の割り当てリーダー
  • 属性定義リーダー
  • 属性の割り当て管理者
  • 属性定義管理者

既定では、グローバル管理者と他の管理者ロールには、カスタム セキュリティ属性の読み取り、定義、または割り当て権限はありません。

HTTP 要求

GET /directory/attributeSets

オプションのクエリ パラメーター

このメソッドは、応答の $selectカスタマイズ $topに役立つ 、 、 $orderBy および OData クエリ パラメーターをサポートします。 一般的な情報については、「OData クエリ パラメーター」を参照してください。

要求ヘッダー

名前 説明
Authorization ベアラー {token}。必須。

要求本文

このメソッドには、要求本文を指定しません。

応答

成功した場合、このメソッドは応答コード 200 OK と、応答本文の attributeSet オブジェクトのコレクションを返します。

例 1: すべての属性セットを取得する

次の使用例は、テナント内のすべての属性セットを取得します。

要求

GET https://graph.microsoft.com/beta/directory/attributeSets

応答

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#directory/attributeSets",
    "value": [
        {
            "description": "Attributes for engineering team",
            "id": "Engineering",
            "maxAttributesPerSet": 25
        },
        {
            "description": "Attributes for marketing team",
            "id": "Marketing",
            "maxAttributesPerSet": 25
        }
    ]
}

例 2: 上位属性セットを取得する

次の例では、ページングをサポートする上位 10 の属性セットを取得します。

要求

GET https://graph.microsoft.com/beta/directory/attributeSets?$top=10

応答

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#directory/attributeSets",
    "@odata.nextLink": "https://graph.microsoft.com/beta/directory/attributeSets?$top=10&$skiptoken={skiptoken}",
    "value": [
        {
            "description": "Attributes for engineering team",
            "id": "Engineering",
            "maxAttributesPerSet": 25
        },
        {
            "description": "Attributes for marketing team",
            "id": "Marketing",
            "maxAttributesPerSet": 25
        }
    ]
}

例 3: 属性セットを順番に取得する

次の使用例は、id で順序付けられた属性セットを取得します。

要求

GET https://graph.microsoft.com/beta/directory/attributeSets?$orderBy=id

応答

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#directory/attributeSets",
    "value": [
        {
            "description": "Attributes for applications",
            "id": "Application",
            "maxAttributesPerSet": 25
        },
        {
            "description": "Attributes for engineering team",
            "id": "Engineering",
            "maxAttributesPerSet": 25
        }
    ]
}