Read the MX email provider for the user who owns the API token.
Before You Begin
🔗 Use the GraphQL Playground to execute the query in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
- User session: This query is for the signed-in user. A service-account token always returns
PROVIDER_NOT_IDENTIFIED. Service-account addresses are onservice-account.pipefy.com, and that domain has no MX record. - Current user: This query takes no arguments. It reads the user who owns the token.
- Unconfirmed email:
emailProviderDataby itself is allowed on/graphqlfor a user whose email is not confirmed. An operation that also selectsmeis rejected.meis not on that allowlist.
Step 1: Query the email provider
Use emailProviderData to read the provider of the token's own user:
query {
emailProviderData {
providerName
}
}
Key fields explained
- providerName: The email domain's MX provider.
googlemeans Google Workspace or Gmail. Any other domain returns the MX second-level domain, for exampleoutlook.
Step 2: Execute and interpret the response
For a signed-in user, a successful lookup returns the provider under data.emailProviderData. A service-account token does not reach this response:
{
"data": {
"emailProviderData": {
"providerName": "google"
}
}
}
Key Notes
- The field reads the token's own user. A service-account token always returns
PROVIDER_NOT_IDENTIFIED. providerNameis the email domain's MX provider:googlefor Google Workspace or Gmail, otherwise the MX second-level domain (for exampleoutlook).- When the provider cannot be identified, the API returns an error with code
PROVIDER_NOT_IDENTIFIED. Match on the code. The message is localized.

