Microsoft Entra ID オブジェクトの高度なクエリ機能

Microsoft Entra が安定性、可用性、パフォーマンスにおいてより多くの機能と改善を提供し続けるにつれて、Microsoft Graph も進化と拡張を続け、データに効率的にアクセスできるようになります。 1 つの方法は、さまざまな Microsoft Entra ID オブジェクト (ディレクトリ オブジェクトとも呼ばれます) とそのプロパティでの詳細クエリ機能に対する Microsoft Graph のサポートを増加することにより実現します。 たとえば、 not (not)、not equals (ne)、ends with (endsWith) 演算子を$filter クエリ パラメーターに追加します。

Microsoft Graph クエリ エンジンは、インデックス ストアを使用してクエリ要求を実行します。 一部のプロパティでクエリ機能のサポートを追加するために、これらのプロパティは別のストアでインデックス付けされるようになりました。 この個別のインデックス作成により、Microsoft Entra ID はサポートを強化し、クエリ要求のパフォーマンスを向上させることができます。 ただし、これらの高度なクエリ機能は既定では使用できませんが、要求者は ConsistencyLevel ヘッダー を eventual に設定する必要があります。ただし$search を除いて、$count クエリ パラメーターを使用します。 ConsistencyLevel ヘッダーと $count は、詳細クエリ パラメーターと呼ばれます。

たとえば、非アクティブなユーザー アカウントのみを取得する場合は、$filter クエリ パラメーターを使用するこれらのクエリのいずれかを実行できます。

オプション 1:eq 演算子で $filter クエリ パラメーターを使用します。 この要求は既定で機能します。つまり、要求は詳細クエリ パラメーターを必要としません。

GET https://graph.microsoft.com/v1.0/users?$filter=accountEnabled eq false

オプション 2:ne 演算子で $filter クエリ パラメーターを使用します。 ne 演算子は詳細クエリでのみサポートされているため、この要求は既定ではサポートされていません。 したがって、ConsistencyLevel ヘッダー セットを eventual に追加するとともに$count=true クエリ文字列を使用する必要があります。

GET https://graph.microsoft.com/v1.0/users?$filter=accountEnabled ne true&$count=true
ConsistencyLevel: eventual

高度なクエリ機能をサポートする Microsoft Entra ID (ディレクトリ) オブジェクト

これらの高度なクエリ機能は、ディレクトリ オブジェクトと、以下の頻繁に使用されるオブジェクトを含む、そのリレーションシップのサブセットでのみサポートされます。

オブジェクト リレーションシップ
administrativeUnit
  • members
  • application
  • 所有者
  • appRoleAssignment -
    device
  • memberOf
  • transitiveMemberOf
  • registeredUsers
  • registeredOwners
  • group
  • members
  • transitiveMembers
  • memberOf
  • transitiveMemberOf
  • 所有者
  • appRoleAssignments
  • oAuth2PermissionGrant (委任されたアクセス許可の付与) -
    orgContact
  • memberOf
  • transitiveMemberOf
  • servicePrincipal
  • memberOf
  • transitiveMemberOf
  • appRoleAssignments
  • appRoleAssignmentsTo
  • oAuth2PermissionGrant
  • user
  • memberOf
  • transitiveMemberOf
  • ownedObjects
  • registeredDevices
  • ownedDevices
  • transitiveManagers
  • directReports
  • transitiveReports
  • appRoleAssignments
  • oAuth2PermissionGrant
  • 高度なクエリ機能を必要とするクエリ シナリオ

    次の表に、詳細クエリでのみサポートされるディレクトリ オブジェクトのクエリ シナリオを示します。

    説明
    URL セグメントとしての $count の使用 GET~/groups/$count
    クエリ文字列パラメーターとしての $count の使用 GET~/servicePrincipals?$count=true
    $filter式での$countの使用 GET~/users?$filter=assignedLicenses/$count eq 0&$count=true
    $search の使用 GET~/applications?$search="displayName:Browser"
    一部のプロパティでの $orderby の使用 GET~/applications?$orderby=displayName&$count=true
    endsWith 演算子での $filter の使用 GET~/users?$count=true&$filter=endsWith(mail,'@outlook.com')
    同じクエリでの $filter$orderby の使用 GET../applications?$orderby=displayName&$filter=startsWith( displayName, 'Box')&$count=true
    特定のプロパティの startsWith 演算子での $filter の使用。 GET~/users?$filter=startsWith(mobilePhone, '25478') OR startsWith(mobilePhone, '25473')&$count=true
    ne および not 演算子と $filter の使用 GET~/users?$filter=companyName ne null and NOT(companyName eq 'Microsoft')&$count=true
    not および startsWith 演算子と $filter の使用 GET~/users?$filter=NOT startsWith(displayName, 'Conf')&$count=true
    endsWith 演算子を使用したコレクションにおける $filter の使用 GET~/users?$count=true&$filter=proxyAddresses/any (p:endsWith(p, 'contoso.com'))&$select=id,displayName,proxyaddresses
    遷移的なメンバーリストでの OData キャストの使用 GET~/me/transitiveMemberOf/microsoft.graph.group?$count=true

    注:

    • $filter$orderbyの併用は、高度なクエリでのみサポートされます。
    • $expand は、現在、高度なクエリではサポートされていません。
    • 現在、高度なクエリ機能は、Azure AD B2C テナントでは使用できません。
    • バッチ要求で高度なクエリ機能を使用するには、POST 要求の JSON 本文で ConsistencyLevel ヘッダーを指定します。

    Microsoft Entra ID (ディレクトリ) オブジェクトのプロパティによるフィルターのサポート

    ディレクトリ オブジェクトのプロパティは、クエリ パラメーターのサポートにおいて異なる動作をします。 ディレクトリ オブジェクトの一般的なシナリオは次のとおりです。

    • 既定でサポートされているクエリは高度なクエリ パラメーターでも機能しますが、最終的には応答が一貫したものになります。
    • in演算子は、eq演算子が既定でサポートされる場合はいつでも、既定でサポートされます。
    • endsWith 演算子は、 mailotherMailsuserPrincipalNameproxyAddresses プロパティに対する高度なクエリ パラメーターでのみサポートされます。
    • 空のコレクション (/$count eq 0/$count ne 0) と 1 つ未満のオブジェクトを持つコレクション (/$count eq 1/$count ne 1) の取得は、高度なクエリ パラメーターでのみサポートされます。
    • not およびne 否定演算子は、高度なクエリ パラメーターでのみサポートされます。
      • eq 演算子をサポートするすべてのプロパティは、ne または not 演算子もサポートします。
      • any ラムダ演算子を使用するクエリの場合は、not 演算子を使用します。 「ラムダ演算子を使用したフィルター」を参照してください。

    次の表は、ディレクトリ オブジェクトのプロパティによる $filter 演算子のサポートをまとめたものであり、高度なクエリ機能を使用したクエリがサポートされる場所を示しています。

    Legend

    • 既定で動作します。高度なクエリ パラメーターは必要ありません。$filter 演算子は、そのプロパティに対して既定で機能します。
    • 高度なクエリ パラメーターが必要です。$filter 演算子には、次の高度なクエリ パラメーター必要です。
      • ConsistencyLevel=eventual ヘッダー
      • $count=true クエリ文字列
    • サポートされていません。$filter 演算子は、そのプロパティではサポートされません。 [フィードバックを送信] して、このプロパティがシナリオに $filter をサポートすることを要求します。
    • 空白のセルは、クエリがそのプロパティに対して無効であることを示します。
    • null 値列は、プロパティが null 許容であり、nullを使用してフィルター可能であることを示します。
    • ここに記載されていないプロパティは、$filter を一切サポートしました。

    管理単位のプロパティ

    プロパティ eq startsWith eq Null
    説明 詳細情報 詳細情報 詳細情報
    displayName 既定 既定 詳細情報
    isMemberManagementRestricted 既定 NotSupported
    membershipRule 既定 既定 NotSupported
    membershipRuleProcessingState 既定 NotSupported
    scopedRoleMembers/any(s:s/id) 既定

    アプリケーションのプロパティ

    プロパティ eq startsWith ge/le eq Null
    appId 既定
    createdDateTime 既定 既定 詳細情報
    createdOnBehalfOf/id 既定
    説明 詳細情報 詳細情報 詳細情報
    disabledByMicrosoftStatus 既定 NotSupported
    displayName 既定 既定 詳細情報
    federatedIdentityCredentials/any(f:f/issuer) 詳細情報 詳細情報 NotSupported
    federatedIdentityCredentials/any(f:f/name) 詳細情報 詳細情報 NotSupported
    federatedIdentityCredentials/any(f:f/subject) 詳細情報 詳細情報 NotSupported
    identifierUris/any(p:p) 既定 既定
    info/logoUrl NotSupported NotSupported 詳細情報
    info/termsOfServiceUrl 詳細情報 詳細情報 NotSupported
    notes 詳細情報 詳細情報 詳細情報
    publicClient/redirectUris/any(p:p) 詳細情報 詳細情報
    publisherDomain 既定 既定 NotSupported
    requiredResourceAccess/any(r:r/resourceAppId) 詳細情報
    serviceManagementReference 詳細情報 詳細情報 詳細情報
    signInAudience 既定 NotSupported
    spa/redirectUris/any(p:p) 詳細情報 詳細情報
    tags/any(p:p) 既定 既定
    uniqueName 既定 既定 NotSupported
    verifiedPublisher/displayName 詳細情報 詳細情報 詳細情報
    web/homePageUrl 詳細情報 詳細情報 詳細情報
    web/redirectUris/any(p:p) 詳細情報 詳細情報

    アプリケーション エンティティの次のプロパティは、フィルター式でのコレクションの $count をサポートしています。

    プロパティ eq Count 0 eq Count 1
    extensionProperties/$count 詳細情報 NotSupported
    federatedIdentityCredentials/$count 詳細情報 NotSupported

    コントラクト プロパティ

    プロパティ eq startsWith
    customerId 既定
    defaultDomainName 既定 既定
    displayName 既定 既定

    デバイス プロパティ

    プロパティ eq startsWith ge/le eq Null
    accountEnabled 既定 NotSupported
    alternativeSecurityIds/any(a:a/identityProvider) 詳細情報 詳細情報 NotSupported
    alternativeSecurityIds/any(a:a/type) 既定 詳細情報 NotSupported
    approximateLastSignInDateTime 既定 既定 詳細情報
    deviceCategory 詳細情報 詳細情報 詳細情報
    deviceId 既定
    deviceOwnership 詳細情報 詳細情報
    displayName 既定 既定 詳細情報
    enrollmentProfileName 詳細情報 詳細情報 詳細情報
    extensionAttributes/extensionAttribute1-15 詳細情報 詳細情報 詳細情報
    hostnames/any(p:p) 既定 既定
    isCompliant 既定 NotSupported
    isManaged 既定 NotSupported
    isRooted 詳細情報 詳細情報
    managementType 詳細情報 詳細情報
    manufacturer 詳細情報 詳細情報 詳細情報
    mdmAppId 既定
    model 詳細情報 詳細情報 詳細情報
    onPremisesLastSyncDateTime 既定 既定 NotSupported
    onPremisesSecurityIdentifier 既定 詳細情報
    onPremisesSyncEnabled 既定 詳細情報
    operatingSystem 既定 既定 詳細情報
    operatingSystemVersion 既定 既定 詳細情報
    physicalIds/any(p:p) 既定
    profileType 既定 NotSupported
    registrationDateTime 詳細情報 詳細情報 詳細情報
    trustType 既定 NotSupported

    device エンティティの次のプロパティは、フィルター式でのコレクションの $count をサポートしています。

    プロパティ eq Count 0 eq Count 1
    physicalIds/$count 詳細情報 NotSupported
    systemLabels/$count 詳細情報 NotSupported

    ディレクトリ ロールのプロパティ

    プロパティ eq startsWith eq Null
    説明 詳細情報 詳細情報 詳細情報
    displayName 既定 詳細情報 詳細情報
    roleTemplateId 既定 NotSupported

    グループのプロパティ

    プロパティ eq startsWith ge/le eq Null
    appRoleAssignments/any(a:a/id) 既定
    assignedLicenses/any(a:a/skuId) 既定
    classification 既定 既定 NotSupported
    createdByAppId 既定
    createdOnBehalfOf/id 既定
    説明 詳細情報 詳細情報 詳細情報
    displayName 既定 既定 詳細情報
    expirationDateTime 詳細情報 詳細情報 NotSupported
    hasMembersWithLicenseErrors 既定 既定
    infoCatalogs/any(p:p) 既定 既定
    isAssignableToRole 既定 NotSupported
    mail 既定 既定 詳細情報
    mailEnabled 既定 NotSupported
    mailNickname 既定 既定 詳細情報
    membershipRule 既定 既定 NotSupported
    membershipRuleProcessingState 既定 NotSupported
    onPremisesLastSyncDateTime 既定 既定 NotSupported
    onPremisesProvisioningErrors/any(o:o/category) 既定 NotSupported
    onPremisesProvisioningErrors/any(o:o/propertyCausingError) 既定 NotSupported
    onPremisesSamAccountName 詳細情報 詳細情報 NotSupported
    onPremisesSecurityIdentifier 既定 詳細情報
    onPremisesSyncEnabled 既定 詳細情報
    preferredLanguage 詳細情報 詳細情報 詳細情報
    proxyAddresses/any(p:p) 既定 既定
    renewedDateTime 既定 既定 NotSupported
    resourceBehaviorOptions/any(p:p) 既定
    resourceProvisioningOptions/any(p:p) 既定
    securityEnabled 既定 NotSupported
    settings/any(s:s/displayName) 既定 既定 NotSupported
    settings/any(s:s/id) 既定
    uniqueName 既定 既定 NotSupported

    group エンティティの次のプロパティは、フィルター式でのコレクションの $count をサポートしています。

    プロパティ eq Count 0 eq Count 1
    assignedLicenses/$count 詳細情報 NotSupported
    onPremisesProvisioningErrors/$count 詳細情報 NotSupported
    proxyAddresses/$count 詳細情報 NotSupported

    組織の連絡先のプロパティ

    プロパティ eq startsWith ge/le eq Null
    CompanyName 詳細情報 詳細情報 詳細情報
    department 既定 既定 詳細情報
    displayName 既定 既定 詳細情報
    givenName 既定 既定 詳細情報
    jobTitle 既定 既定 詳細情報
    mail 既定 既定 詳細情報
    mailNickname 既定 既定 詳細情報
    manager/id 既定
    onPremisesLastSyncDateTime 既定 既定 NotSupported
    onPremisesProvisioningErrors/any(o:o/category) 既定 NotSupported
    onPremisesProvisioningErrors/any(o:o/propertyCausingError) 既定 NotSupported
    onPremisesSyncEnabled 既定 詳細情報
    proxyAddresses/any(p:p) 既定 既定
    surname 既定 既定 詳細情報

    orgContact エンティティの次のプロパティは、フィルター式でのコレクションの $count をサポートしています。

    プロパティ eq Count 0 eq Count 1
    onPremisesProvisioningErrors/$count 詳細情報 NotSupported
    proxyAddresses/$count 詳細情報 NotSupported

    サービス プリンシパルのプロパティ

    プロパティ eq startsWith ge/le eq Null
    accountEnabled 既定 NotSupported
    alternativeNames/any(p:p) 既定 既定
    appId 既定
    appOwnerOrganizationId 詳細情報
    appRoleAssignedTo/any(a:a/id) 既定
    appRoleAssignmentRequired 詳細情報 NotSupported
    appRoleAssignments/any(a:a/id) 既定
    applicationTemplateId 既定
    createdObjects/any(c:c/id) 詳細情報
    delegatedPermissionClassifications/any(d:d/id) 既定
    説明 詳細情報 詳細情報 詳細情報
    displayName 既定 既定 詳細情報
    federatedIdentityCredentials/any(f:f/issuer) 詳細情報 詳細情報 NotSupported
    federatedIdentityCredentials/any(f:f/name) 詳細情報 詳細情報 NotSupported
    federatedIdentityCredentials/any(f:f/subject) 詳細情報 詳細情報 NotSupported
    HomePage 詳細情報 詳細情報 詳細情報
    info/logoUrl NotSupported NotSupported 詳細情報
    info/termsOfServiceUrl 詳細情報 詳細情報 NotSupported
    notes 詳細情報 詳細情報 詳細情報
    oauth2PermissionGrants/any(o:o/id) 既定
    preferredSingleSignOnMode 既定 NotSupported
    preferredTokenSigningKeyEndDateTime 既定 既定 NotSupported
    publisherName 既定 既定 NotSupported
    remoteDesktopSecurityConfiguration/id 既定
    remoteDesktopSecurityConfiguration/targetDeviceGroups/any(t:t/displayName) 既定 既定 NotSupported
    remoteDesktopSecurityConfiguration/targetDeviceGroups/any(t:t/id) 既定
    servicePrincipalNames/any(p:p) 既定 既定
    servicePrincipalType 既定 NotSupported
    tags/any(p:p) 既定 既定
    verifiedPublisher/displayName 詳細情報 詳細情報 詳細情報

    servicePrincipal エンティティの次のプロパティは、フィルター式でのコレクションの $count をサポートしています。

    プロパティ eq Count 0 eq Count 1
    federatedIdentityCredentials/$count 詳細情報 NotSupported
    ownedObjects/$count 詳細情報 詳細情報

    ユーザーのプロパティ

    プロパティ eq startsWith ge/le eq Null
    accountEnabled 既定 NotSupported
    ageGroup 既定 NotSupported
    appRoleAssignments/any(a:a/id) 既定
    assignedLicenses/any(a:a/skuId) 既定
    assignedPlans/any(a:a/capabilityStatus) 詳細情報 NotSupported
    assignedPlans/any(a:a/service) 詳細情報 詳細情報 NotSupported
    assignedPlans/any(a:a/servicePlanId) 詳細情報
    authorizationInfo/certificateUserIds/any(p:p) 詳細情報
    businessPhones/any(p:p) 詳細情報 詳細情報
    city 既定 既定 詳細情報
    cloudRealtimeCommunicationInfo/isSipEnabled 既定 NotSupported
    CompanyName 詳細情報 詳細情報 詳細情報
    consentProvidedForMinor 既定 NotSupported
    country 既定 既定 詳細情報
    createdDateTime 既定 既定 詳細情報
    createdObjects/any(c:c/id) 詳細情報
    creationType 既定 NotSupported
    department 既定 既定 詳細情報
    displayName 既定 既定 詳細情報
    employeeHireDate 詳細情報 詳細情報 NotSupported
    employeeId 既定 詳細情報
    employeeOrgData/costCenter 詳細情報 詳細情報 NotSupported
    employeeOrgData/division 詳細情報 詳細情報 NotSupported
    employeeType 詳細情報 NotSupported
    externalUserState 既定 NotSupported
    faxNumber 詳細情報 詳細情報 詳細情報
    givenName 既定 既定 詳細情報
    identities/any(i:i/issuer) 既定 NotSupported 既定
    imAddresses/any(p:p) 既定 既定
    infoCatalogs/any(p:p) 既定 既定
    isLicenseReconciliationNeeded 既定 NotSupported
    isResourceAccount 既定 NotSupported
    jobTitle 既定 既定 詳細情報
    licenseDetails/any(l:l/id) 既定
    mail 既定 既定 詳細情報
    mailNickname 既定 既定 詳細情報
    manager/id 既定
    mobilePhone 詳細情報 詳細情報 詳細情報
    oauth2PermissionGrants/any(o:o/id) 既定
    officeLocation 詳細情報 詳細情報 詳細情報
    onPremisesDistinguishedName 詳細情報 詳細情報 詳細情報
    onPremisesExtensionAttributes/extensionAttribute1-15 詳細情報 詳細情報 詳細情報
    onPremisesImmutableId 既定
    onPremisesLastSyncDateTime 既定 既定 NotSupported
    onPremisesProvisioningErrors/any(o:o/category) 既定 NotSupported
    onPremisesProvisioningErrors/any(o:o/propertyCausingError) 既定 NotSupported
    onPremisesSamAccountName 詳細情報 詳細情報 NotSupported
    onPremisesSecurityIdentifier 既定 詳細情報
    onPremisesSipInfo/isSipEnabled 詳細情報 NotSupported
    onPremisesSyncEnabled 既定 詳細情報
    otherMails/any(p:p) 既定 既定
    passwordPolicies NotSupported NotSupported 詳細情報
    passwordProfile/forceChangePasswordNextSignIn 詳細情報 詳細情報
    passwordProfile/forceChangePasswordNextSignInWithMfa 詳細情報 詳細情報
    postalCode 詳細情報 詳細情報 詳細情報
    preferredLanguage 詳細情報 詳細情報 詳細情報
    provisionedPlans/any(p:p/provisioningStatus) 詳細情報 NotSupported
    provisionedPlans/any(p:p/service) 詳細情報 詳細情報 NotSupported
    proxyAddresses/any(p:p) 既定 既定
    scopedRoleMemberOf/any(s:s/id) 既定
    showInAddressList 詳細情報 NotSupported
    state 既定 詳細情報
    streetAddress 詳細情報 詳細情報 詳細情報
    surname 既定 既定 詳細情報
    usageLocation 既定 既定 詳細情報
    userPrincipalName 既定 既定 NotSupported
    userType 既定 詳細情報

    user エンティティの次のプロパティは、フィルター式でのコレクションの $count をサポートしています。

    プロパティ eq Count 0 eq Count 1
    assignedLicenses/$count 詳細情報 NotSupported
    onPremisesProvisioningErrors/$count 詳細情報 NotSupported
    otherMails/$count 詳細情報 NotSupported
    ownedObjects/$count 詳細情報 詳細情報
    proxyAddresses/$count 詳細情報 NotSupported

    次の表は、user オブジェクトの他の拡張プロパティによる $filter のサポートを示しています。

    拡張機能の種類 eq startsWith eq null
    スキーマ拡張機能 詳細情報 詳細情報 詳細情報
    オープン拡張機能 NotSupported NotSupported NotSupported
    ディレクトリ拡張機能 既定 詳細情報 詳細情報

    Microsoft Entra ID (ディレクトリ) オブジェクトのプロパティによる並べ替えのサポート

    次の表は、ディレクトリ オブジェクトのプロパティによる $orderby のサポートをまとめたものであり、高度なクエリ機能を使用した並べ替えがサポートされる場所を示しています。

    Legend

    • 既定で動作します。高度なクエリ パラメーターは必要ありません。$orderby 演算子は、そのプロパティに対して既定で機能します。
    • 高度なクエリ パラメーターが必要です。$orderby 演算子には、次の高度なクエリ パラメーター必要です。
      • ConsistencyLevel=eventual ヘッダー
      • $count=true クエリ文字列
    • ディレクトリ オブジェクトに対する同じクエリで $filter$orderby を使用するには、常に高度なクエリ パラメーターが必要です。 詳細については、「高度なクエリ機能を必要とするクエリ シナリオ」を参照してください。
    ディレクトリ オブジェクト プロパティ名 $orderby をサポートします
    administrativeUnit createdDateTime 詳細情報
    administrativeUnit deletedDateTime 詳細情報
    administrativeUnit displayName 詳細情報
    アプリケーション createdDateTime 詳細情報
    アプリケーション deletedDateTime 詳細情報
    アプリケーション displayName 詳細情報
    orgContact createdDateTime 詳細情報
    orgContact displayName 詳細情報
    デバイス approximateLastSignInDateTime 詳細情報
    デバイス createdDateTime 詳細情報
    デバイス deletedDateTime 詳細情報
    デバイス displayName 詳細情報
    グループ deletedDateTime 詳細情報
    グループ displayName 既定
    servicePrincipal createdDateTime 詳細情報
    servicePrincipal deletedDateTime 詳細情報
    servicePrincipal displayName 詳細情報
    ユーザー createdDateTime 詳細情報
    ユーザー deletedDateTime 詳細情報
    ユーザー displayName 既定
    ユーザー userPrincipalName 既定

    ディレクトリ オブジェクトの詳細クエリに対するエラー処理

    ディレクトリ オブジェクトのカウントは、詳細クエリ パラメーターの使用でのみサポートされます。 ConsistencyLevel=eventual ヘッダーが指定されていない場合、要求は、$count URL セグメントが使用されているときエラーを返し、$count クエリ パラメーター (?$count=true) が使用されているときサイレントに無視します。

    GET https://graph.microsoft.com/v1.0/users/$count
    
    {
        "error": {
            "code": "Request_BadRequest",
            "message": "$count is not currently supported.",
            "innerError": {
                "date": "2021-05-18T19:03:10",
                "request-id": "d9bbd4d8-bb2d-44e6-99a1-71a9516da744",
                "client-request-id": "539da3bd-942f-25db-636b-27f6f6e8eae4"
            }
        }
    }
    

    ディレクトリ オブジェクトの場合、 $search は高度なクエリでのみ機能します。 ConsistencyLevel ヘッダーが指定されていない場合、要求はエラーを返します。

    GET https://graph.microsoft.com/v1.0/applications?$search="displayName:Browser"
    
    {
        "error": {
            "code": "Request_UnsupportedQuery",
            "message": "Request with $search query parameter only works through MSGraph with a special request header: 'ConsistencyLevel: eventual'",
            "innerError": {
                "date": "2021-05-27T14:26:47",
                "request-id": "9b600954-ba11-4899-8ce9-6abad341f299",
                "client-request-id": "7964ef27-13a3-6ca4-ed7b-73c271110867"
            }
        }
    }
    

    URL のプロパティまたはクエリ パラメーターが詳細クエリでのみサポートされているが、ConsistencyLevel ヘッダーまたは $count=true クエリ文字列のいずれかが欠落している場合、要求はエラーを返します。

    GET https://graph.microsoft.com/beta/users?$filter=endsWith(userPrincipalName,'%23EXT%23@contoso.com')
    
    {
        "error": {
            "code": "Request_UnsupportedQuery",
            "message": "Operator 'endsWith' is not supported because the required parameters might be missing. Try adding $count=true query parameter and ConsistencyLevel:eventual header. Refer to https://aka.ms/graph-docs/advanced-queries for more information",
            "innerError": {
                "date": "2023-07-14T08:43:39",
                "request-id": "b3731da7-5c46-4c37-a8e5-b190124d2531",
                "client-request-id": "a1556ddf-4794-929d-0105-b753a78b4c68"
            }
        }
    }
    

    クエリ パラメーターをサポートするようにプロパティにインデックスが付けられていない場合、詳細クエリ パラメーターが指定されていても、要求はエラーを返します。

    GET https://graph.microsoft.com/beta/groups?$filter=createdDateTime ge 2021-11-01&$count=true
    ConsistencyLevel: eventual
    
    {
        "error": {
            "code": "Request_UnsupportedQuery",
            "message": "Unsupported or invalid query filter clause specified for property 'createdDateTime' of resource 'Group'.",
            "innerError": {
                "date": "2023-07-14T08:42:44",
                "request-id": "b6a5f998-94c8-430d-846d-2eaae3031492",
                "client-request-id": "2be83e05-649e-2508-bcd9-62e666168fc8"
            }
        }
    }
    

    ただし、クエリ パラメーターを含む要求は、サイレントに失敗する可能性があります。 たとえば、クエリ パラメーターがサポートされていない場合や、クエリ パラメーターの組み合わせがサポートされていない場合です。 その場合、要求によって返されたデータを調べ、指定したクエリ パラメーターに期待どおりの効果があったかどうかを確認してください。 たとえば、次の例では、クエリが成功の場合でも @odata.count パラメーターが欠落しています。

    GET https://graph.microsoft.com/v1.0/users?$count=true
    
    HTTP/1.1 200 OK
    Content-type: application/json
    
    {
      "@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users",
      "value":[
        {
          "displayName":"Oscar Ward",
          "mail":"oscarward@contoso.com",
          "userPrincipalName":"oscarward@contoso.com"
        }
      ]
    }