Skip to main content
POST
CountGrantsForUserByApp

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Body

application/json

CountGrantsForUserByApp request.

appIds
string[] | null

Restrict the count to these applications. Empty counts grants across all applications the user has access to.

userId
string

The user whose grants to count.

Response

200 - application/json

CountGrantsForUserByApp response. Grant counts are computed directly from grant bindings and are an upper bound on what SearchGraph renders for the same user and app filter — SearchGraph applies additional filters that these counts do not.

CountGrantsForUserByApp response. Grant counts are computed directly from grant bindings and are an upper bound on what SearchGraph renders for the same user and app filter — SearchGraph applies additional filters that these counts do not.

appCount
integer<int32>

The number of applications represented in app_grant_counts.

appGrantCounts
Graph App Grant Count · object[] | null

Grant counts, one entry per application the user has at least one grant in (or per requested app_id, if narrower).

appUsers
App User Ref · object[] | null

The user's accounts, scoped by the app_ids filter when provided. Includes accounts with zero counted grants. Lets callers filter a subsequent access graph by account without a second lookup.

band
enum<string>

Advisory size classification for the user's access graph. See GraphSizeBand.

Available options:
GRAPH_SIZE_BAND_UNSPECIFIED,
GRAPH_SIZE_BAND_NORMAL,
GRAPH_SIZE_BAND_SUMMARIZED,
GRAPH_SIZE_BAND_TOO_LARGE
totalGrants
string<int64>

The sum of grant_count across all app_grant_counts.