Fast connector Framework and Retrieving Oauth tokens

We have configured a scribe online connector using the fast connector framework, to connect to a REST webservice (with GET and POST methods). This REST webservice uses oauth (Azure AD) as authentication provider. We created a method to retrieve the authentication token. This works and we can send information to the webservice, including the correct authentication token.


However, when we have a process that runs for more than 1 hour (which is the default expiration time of an oauth token) we receive a 401 error, since we provide a wrong token. Our auth provider does not provide a refreshToken.


Current process execution Flow

The current integration flow is like this

-         Retrieve 100.000 accounts from Dynamics CRM

-         Custom connector initializes and then

-         (1) Retrieve authentication token

-         (2) and then for each record à POST data to API/Klant



I would expect that we are able to acuire the oauth token at the execution of the POST message to the webservice, I think this is possible by overriding the CreateClient function within the fast connector framework – to generate the authentication token at that moment in time.


Expected process execution Flow

The expected integration flow would be like this

-         Retrieve 100.000 accounts from Dynamics CRM

-         Custom connector initializes

-         (1) For each record: Retrieve authentication token (if required)

-         (2) For each record: POST data to API/Customer



Anyone has an idea on how to achieve this?


I have read this, but think it is different


Also the following document does not contain any information regarding this subject. ,

How would you retrieve the access token in this example code given?

return this.Connection.Configure("GET", connInfo => connInfo.BaseUrl + "/EnterConnectionUrlHere")

.ConnectionInfoToBaseUrl(info => info.BaseUrl) // Set the BaseUrl for subsequent calls

.ToHeader("oauth_token", this.AccessToken) // Put the AccessToken in the right place

.End(); // Finish the configuration


I added the code/image as attachments.


Or could this be that this is not possible using the fast connector framework?


(8) Answers