GraphQL Variables incorrectly serialized as string when using nativeIdentity in Webservice SaaS connector

We’re encountering an issue when using GraphQL queries within the Webservice SaaS connector in SailPoint IdentityNow.

We want to fetch data from an external GraphQL API using this query:

query MyQuery($id: Int!) {
  user(id: $id) {
    name
    email
    isActive
  }
}

In the GraphQL Variables field, we provide:

{
  "id": $nativeIdentity$
}

At runtime, $nativeIdentity$ is correctly resolved to a numeric value, e.g., 791.

:cross_mark: Problem:

SailPoint appears to serialize the entire variables object as a string.
Instead of sending:

"variables": { "id": 791 }

It sends:

String-token with value `{\n    \"id\": 791\n}`.",

— which causes the GraphQL server to throw the error:

Expected an object or a null-token, but found a String-token with value ...


This makes it impossible to pass variables of type Int! using SailPoint placeholders in the intended way.


:white_check_mark: What does work:

Hardcoding the value inside the query without using variables:

query {
  user(id: 791) {
    name
  }
}

This works, but it’s inflexible and unsuitable for dynamic or complex queries/mutations.


:red_question_mark:Questions:

  • Is this a known bug or limitation of the GraphQL support in the Webservice SaaS connector?

  • Is there a workaround to ensure that GraphQL variables are properly serialized as JSON objects (not strings) when using placeholders like $nativeIdentity$?

  • Will future updates allow proper variable substitution in GraphQL variables?

Any input or guidance from the community or the SailPoint team is appreciated!

1 Like