Skip to main content

Dear community, 

I have implemented a workflow with FME and ArcGIS Enterprise, in which an automation is triggered in FME via a referenced feature service with a webhook. Based on the entries in the ArcGIS Field Maps App, an e-mail is then to be sent via FME.

This is set up accordingly according to the following documentation: https://support.safe.com/hc/en-us/articles/25407414850061-Integrating-ArcGIS-Enterprise-Feature-Service-Webhooks-With-FME 

The connection from the application in ArcGIS Enterprise to FME is also set up accordingly: https://support.safe.com/hc/en-us/articles/25407772142733-How-to-Create-an-ArcGIS-Enterprise-Portal-Web-Connection-OAuth-2-0 

The problem that arose is that the OAuth refresh token created in ArcGIS Enterprise has a default lifetime of 2 weeks and I therefore have to authorize myself every 2 weeks (see https://enterprise.arcgis.com/de/portal/latest/administer/windows/specify-the-default-token-expiration-time.htm).

Based on this community entry: https://community.safe.com/community-q-a-54/create-token-based-web-service-not-oauth-2-to-connect-to-arcgis-portal-from-fme-34792?postid=155325#post155325

I assumed that when i run a process with the webconnection, the refreshing of the refresh token will be made so the connection can be used longer than 2 weeks and I dont have to authorize myself every 2 weeks.

To renew the OAuth refresh token, a workspace that uses this web connection ran every 7 days in FME Server.

Unfortunately, that didnt work for me and after more than 14 days I had to “re-authorize” the web connection in the FME server GUI (entering the ArcGIS credentials).

Following the advice from the FME community, I have already created a new application in ArcGIS Enterprise Portal, which is only used in the FME server, as there could be conflicts when using one and the same web connection in several FME instances. But this did not work too.
 

Has anyone ever had the same or similar behavior?

Kind regards,

Tim

 

 

Hi,

Safe have made lots of advancements in this space (based of improvement related to cases I have raised), so hopefully it should be all working very nicely by the 2025 version.

Attached is a workspace that will refresh a token in your esri environment. It is password protected due to me being cautious about what it does in the backend system, and not that it has something dodgy to hide. Running this process will update your existing valid refresh token, so if that fails, then there is something wrong with the setup.

To make it run, you just need to select the connecting you want to refresh (That connection needs to be authorised in the first place). The process will fail if the refresh token is not authorised when it runs, or when there is a problem with the service setup.

Here is its contents:

  

 


Hello todd_davis,

Thank you so much for your answer!

Could you provide me the password for the workspace? I would love to check it out and understand how the process actually works.

Kind regards,

Tim
 


How do you have the refresh token parameters set up in your web service? I had to alter the request format from the Safe template in order to maintain connectivity. A workspace using the connection was running daily but would fail after a few days of working

 

 


Hi ​@todd_davis,

could you share the password for your workspace. I’m currently facing a similar problem. Thank you!


Hi, 

It is password protected so that others don’t know how this python works in FME. 
 

If you want to replicate it today, the webservices python library will give you ability to do the same things.

 

Cheers,

Todd


Also starting with FME 2024.1 there’s a new ESRI Token based Web Connection that can be used, so it ask for a token every time it’s used, so it doesn’t expires. This is available for AGOL and Enterprise.


Reply