Able to get the access token via JWT authentication method by using Postman. But facing error when using UiPath

hello , I am able to get the access token via JWT authentication method by using postman. But facing error when using UiPath. I am following the steps mentioned in the 2.Using JWT section
at Setup. Below is the error that I am getting : RemoteException wrapping System.AggregateException: One or more errors occurred. —> RemoteException wrapping System.FormatException: Invalid length for a Base-64 char array or string.
at System.Convert.FromBase64_Decode(Char* startInputPtr,
Int32 inputLength,
Byte* startDestPtr,
Int32 destLength)
at System.Convert.FromBase64CharPtr(Char* inputPtr,
Int32 inputLength)
at System.Convert.FromBase64String(String s)
at UiPath.BAF.Authentication.JWT.OAuthJWTAuthentication.BuildSignature(String stringToSign,
String privateKey)
at UiPath.BAF.Authentication.JWT.OAuthJWTAuthentication.d__3.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at UiPath.Swagger.Services.SwaggerConnectionService.d__4.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.BAF.Activities.ScopeActivityBase.<>c__DisplayClass34_0.<b__1>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.BAF.Telemetry.TelemetryServiceBase.d__81.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at UiPath.BAF.Activities.ScopeActivityBase.Connect(NativeActivityContext context)
at UiPath.BAF.Activities.ScopeActivityBase.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance,
ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)

Any help would be appreciated. Thanks

I was using the API Account ID value for the “sub” parameter. Instead it should be the User ID. The authentication worked using the below parameters
{
“typ”: “JWT”,
“alg”: “RS256”,
“iss”: " clientid/integration id ",
“sub”: " UserID ",
“aud”: “account-d.docusign.com”, this is for dev env of docusign
“scope”: “signature impersonation”,
“privatekey”: "RSA private key "
}

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