Skip to main content
Question

How to keep signed into AGOL when FME Flow runs automation every 30 days?

  • August 1, 2026
  • 1 reply
  • 38 views

vxn43
Enthusiast
Forum|alt.badge.img+20

I have an FME Flow 2026.1.1 Automation that runs a series of FME Form workspaces. The 1st workspace grabs data from an AGOL Hosted Feature Service. This automation runs every 30 days. But, every time it runs it gives me an AGOL re-authorization error. Then I need to go into the FME Form workspace and sign back into AGOL and republish to FME Flow. 

What is the best way to keep signed into AGOL for more than 30 days using FME? is there something I need to do in FME Flow, if so, what?

 

I am the admin of our AGOL account. I know I can use a token, but are these good for more than 30 days or just 2 weeks?

 

It would be nice if could stay signed in a year or longer that way the automation would run without the AGOL re-authorization error. 

1 reply

j.botterill
Evangelist
Forum|alt.badge.img+66
  • Evangelist
  • August 3, 2026

There used to be an automation for FME server web connection that would help re-authenticate the (Portal/AGOL) oauth token every 14 days.

But I believe the newer Esri Arcgis web service(safe.esri-agol) authenticates with a stored service‑account username/password against .../sharing/rest/generateToken, rather than the browser‑based OAuth Authorization Code flow. A new token is minted on every run, and critically: on FME Flow, these connections never need to be re-authorized — there's no refresh-token clock ticking down at all.

ArcGIS Online Web Connection Error: 401 Client Error: Unauthorized for URL – FME Support Center

You just need to run any workspace within the 14 days

(or extend the refresh-token lifetime on the Esri side (do this first) As Portal/AGOL admin, raise maxTokenExpirationMinutes to comfortably exceed 30 days)

Build a ‘keep alive’ workspace”

  • Add an Esri ArcGIS Feature Service reader (or ArcGISOnlineConnector) using the OAuth web connection, pointed at any layer you already have access to.
  • Constrain it to almost no data — e.g. a Tester/query filter of 1=0, or resultRecordCount=1 if using the connector's query parameters — you just need FME to exercise the token, not pull real data.
  • Add a Logger so the job log shows success/failure clearly.
  • Publish this to a repository FME Flow can run

Build an automation

  • Trigger: Schedule Trigger, recurrence = monthly (CRON 0 6 1 * * → 6am on the 1st of each month works well; adjust to whatever's quiet on your infra).
  • Action: Run Workspace → the keep‑alive workspace, referencing the OAuth web connection.