Overview
You are looking for instructions on how to perform a read operation on a Cognito user for your Totogi Tenant using the GraphQL API.
Solution
In order to make the requests through the API, the information below is required.
- The Provider ID.
- An Access Token using the credentials from the Tenant Admin User.
In order to perform a Read Operation, one should use the getUser Query API call.
Below is an example payload to Read a Cognito user with some important specifications:
- The user ID along with the Provider ID is a mandatory input and this will be the email ID of the user.
query getUser{
getUser(getUserInput:
{
providerId : "<provider_id>",
userId : "<user email ID>"
}
) {
... on GetUserPayload {
userId,
email,
name,
roleGroupMemberships,
jobTitle
}
... on UserNotFound {
errorMessage,
errorCode,
userId
}
}
}
The result (if the User exists) is the user information as shown below: