Microsoft Authentication: Execute failed: Unable to find any tokens in RSTR

I’m getting this error a LOT lately while using the Microsoft and SharePoint connection nodes. Anyone else seen this? It seems to come and go, but wasn’t an issue for me for the last year until about 2 weeks ago.

Hi @AndrewDevlin ,

Welcome to KNIME Community.

A RequestSecurityTokenResponse (RSTR ) message returns a token in response to a request from a protocol client. In your case there was no token issued/present in the return message and hence the error and this can be of the token was expired or was not refreshed.

Can we know which version of KNIME AP are you using? Also is it possible to share us with the complete logs from the following location? (KNIME_WORKSPACE/.metadata/knime/knime.log) to troubleshoot further?

Regards,
Nagarjun S

1 Like

Hi @nagarjun36
I have a similar problem.

My case:
I’m trying to prepare a workflow that reads some data from Sharepoint. I have to deploy workflow with Knime Server and share it with a group of users. Each user should authenticate with their credentials (AD). I don’t want to save a token as part of the node and/or another file (security). I’m trying to use username/password configuration. In the “user” I’m putting my AD login. In the "password " I’m putting my AD password. I’m checking it locally. Result:
Unable to find any tokens in RSTR

Knime version: 4.4.4. I can’t use other version.

I can’t share whole logs, but there is important (I think) part:
2022-05-25 23:42:21,408 : ERROR : KNIME-Worker-636-Microsoft Authentication 3:1669:0:434 : : Node : Microsoft Authentication : 3:1669:0:434 : Execute failed: Unable to find any tokens in RSTR
java.io.IOException: Unable to find any tokens in RSTR
at org.knime.ext.microsoft.authentication.providers.oauth2.userpass.UsernamePasswordAuthProvider.getCredential(UsernamePasswordAuthProvider.java:199)
at org.knime.ext.microsoft.authentication.providers.oauth2.userpass.UsernamePasswordAuthProvider.getCredential(UsernamePasswordAuthProvider.java:1)
at org.knime.ext.microsoft.authentication.node.auth.MicrosoftAuthenticationNodeModel.createSpec(MicrosoftAuthenticationNodeModel.java:135)
at org.knime.ext.microsoft.authentication.node.auth.MicrosoftAuthenticationNodeModel.execute(MicrosoftAuthenticationNodeModel.java:130)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:549)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1259)
at org.knime.core.node.Node.execute(Node.java:1039)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:365)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:219)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: java.lang.Exception: Unable to find any tokens in RSTR
at com.microsoft.aad.msal4j.WSTrustResponse.parseToken(WSTrustResponse.java:153)
at com.microsoft.aad.msal4j.WSTrustResponse.parse(WSTrustResponse.java:91)
at com.microsoft.aad.msal4j.WSTrustRequest.execute(WSTrustRequest.java:48)
at com.microsoft.aad.msal4j.WSTrustRequest.execute(WSTrustRequest.java:70)
at com.microsoft.aad.msal4j.AcquireTokenByAuthorizationGrantSupplier.processPasswordGrant(AcquireTokenByAuthorizationGrantSupplier.java:98)
at com.microsoft.aad.msal4j.AcquireTokenByAuthorizationGrantSupplier.execute(AcquireTokenByAuthorizationGrantSupplier.java:43)
at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:59)
at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:17)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

Any ideas on how to solve it? Alternatively, any solution which can help me with authentication without saving tokens will work for me also.

Best,
Elderion

Is this resolved? I am facing the same issue

Hi @nidhichirania and @Elderion,

Providing User name and password uses basic authentication on Microsoft authentication node, the only way is to perform interactive authentication. If you insist to perform authentication with username and password, then we recommend you to create a service account and provide the service account details to access the Microsoft nodes.

Let us know for any further queries.

Regards,
Nagarjun S

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.