Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Azure AD REST ConnectionJSON error access token

Yeya
New Contributor III
New Contributor III

Hello,
I am currently trying to update my users created from my HRIS which is the authority source for identities,
I'd like to push an Azure AD attribute value onto a saviynt user attribute.
To do this, I've created a REST connection to perform my user import as described in the documentation (https://docs.saviyntcloud.com/bundle/AzureAD-v24x/page/Content/Configuring-the-Integration-for-Impor... ).

However, I got an error when :

```responseText:{"error":{"code":"InvalidAuthenticationToken","message":"IDX14100: JWT is not well formed, there are no dots (.).\nThe token needs to be in JWS or JWE Compact Serialization Format. (JWS): 'EncodedHeader.EncodedPayload.EncodedSignature'. (JWE): 'EncodedProtectedHeader.EncodedEncryptedKey.EncodedInitializationVector.EncodedCiphertext.EncodedAuthenticationTag'.",```

I saw in another post a person who also had this problem: https://forums.saviynt.com/t5/identity-governance/azuread-user-import-with-rest-connectionjson-not-s...

I checked my URL in my connectionJSON and I didn't leave any space in my url.

I also checked my information in my connectionJSON and my client id, secret and tenant id all seem correct.
Do you have any idea how to resolve this error?
Thanks in advance

6 REPLIES 6

stalluri
Valued Contributor II
Valued Contributor II

@Yeya 

Can you please share the Connection Json by masking all the PII info and logs in text format?


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

rushikeshvartak
All-Star
All-Star

Please share connection json


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Yeya
New Contributor III
New Contributor III

thank for reply,

this is my connectionJSON :

 

{
    "authentications": {
      "userAuth": {
        "authType": "oauth2",
        "url": "https://login.microsoftonline.com/XXX/oauth2/token",
        "httpMethod": "POST",
        "httpParams": {
          "grant_type": "client_credentials",
          "client_secret": "XXX",
          "client_id": "XXX",
          "resource": "https://graph.microsoft.com/"
        },
        "httpHeaders": {
          "contentType": "application/json"
        },
        "httpContentType": "application/json",
        "expiryError": "ExpiredAuthenticationToken",
        "authError": [
          "InvalidAuthenticationToken"
        ],
        "retryFailureStatusCode": [
          401
        ],
        "timeOutError": "Read timed out",
        "errorPath": "error.code",
        "maxRefreshTryCount": 5,
        "tokenResponsePath": "access_token",
        "tokenType": "Bearer",
        "accessToken": "Bearer abcd"
      },
      "entAuth": {
        "authType": "oauth2",
        "url": "https://login.microsoftonline.com/XXX/oauth2/token",
        "httpMethod": "POST",
        "httpParams": {
          "grant_type": "client_credentials",
          "client_secret": "XXX",
          "client_id": "XXX",
          "resource": "https://graph.windows.net/"
        },
        "httpHeaders": {
          "contentType": "application/json"
        },
        "httpContentType": "application/json",
        "expiryError": "ExpiredAuthenticationToken",
        "authError": [
          "InvalidAuthenticationToken",
          "Authentication_MissingOrMalformed"
        ],
        "retryFailureStatusCode": [
          401
        ],
        
        "timeOutError": "Read timed out",
        "errorPath": "odata~dot#error.code",
        "maxRefreshTryCount": 3,
        "tokenResponsePath": "access_token",
        "tokenType": "Bearer",
        "accessToken": "Bearer abcde"
      }
    }
  }

and please found the log : 

Thanks in advance

You have issue with client secret validate first from postman


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

stalluri
Valued Contributor II
Valued Contributor II

@Yeya 
Can you below JSON.

{
    "authentications": {
        "userAuth": {
            "authType": "oauth2",
            "url": "https://login.microsoftonline.com/<Tenant-ID-VALUE>/oauth2/token",
            "httpMethod": "POST",
            "httpParams": {
                "grant_type": "client_credentials",
                "client_secret": "CLIENT_SECRET_VALUE",
                "client_id": "CLIENT_ID_VALUE",
                "resource": "https://graph.microsoft.com/"
            },
            "httpHeaders": {
                "contentType": "application/x-www-form-urlencoded"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "expiryError": "ExpiredAuthenticationToken",
            "authError": [
                "InvalidAuthenticationToken"
            ],
            "retryFailureStatusCode": [
                401
            ],
            "timeOutError": "Read timed out",
            "errorPath": "error.code",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "access_token",
            "tokenType": "Bearer",
            "accessToken": "Bearer abcd"
        },
        "entAuth": {
            "authType": "oauth2",
            "url": "https://login.microsoftonline.com/<TenantID>/oauth2/token",
            "httpMethod": "POST",
            "httpParams": {
                "grant_type": "client_credentials",
                "client_secret": "CLIENT_SECRET_VALUE",
                "client_id": "CLIENT_ID_VALUE",
                "resource": "https://graph.windows.net/"
            },
            "httpHeaders": {
                "contentType": "application/x-www-form-urlencoded"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "expiryError": "ExpiredAuthenticationToken",
            "authError": [
                "InvalidAuthenticationToken",
                "Authentication_MissingOrMalformed"
            ],
            "retryFailureStatusCode": [
                401
            ],
            "timeOutError": "Read timed out",
            "errorPath": "odata~dot#error.code",
            "maxRefreshTryCount": 3,
            "tokenResponsePath": "access_token",
            "tokenType": "Bearer",
            "accessToken": "Bearer abcde"
        }
    }
}

 


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

Amit_Malik
Valued Contributor II
Valued Contributor II

It looks correct only. Hope the secret doesn't have a character or something causing this.  Can you try to generate new one if it is working in postman already

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".