Question

Connecting to ArcGIS Portal from FME Desktop

  • 3 September 2020
  • 11 replies
  • 89 views

Badge

Hello everyone, we try to connect to an ArcGIS Portal with FME Web Connection:

 

Help1

 

I'm wondering, in the case of FME Desktop, what is the value that we have to put in Redirect URI?

When we don't put anything, we have this error:

 

Help2

 

It say Check Log window for more details, but where is this Log window, as we are in FME Options?

Thanks

 


11 replies

Userlevel 3
Badge +13

Hello @Anh Phuong Tran​ ,

Sorry to hear you are having troubles connecting to ArcGIS Portal. The redirect URI will redirect the user after they authorize (or deny) your application. Try setting it to https://localhost for FME Workbench! Can you confirm if your ArcGIS Enterprises is SSL enabled, if NOT, you might have to update the Web service URL to http (as the default uses https). If you would like more information on creating web connections, check out these resources:

Let us know if you are still having difficulties making your web connection! Also, you can access your log window by going to View > Windows > Translation Log.

Here to help,

Kailin Opaleychuk

Badge +4

I recently tried the Enterprise arcgis portal connection with same Safe instructions on setting up OAuth2 authentication, and our portal is SSL enabled. I got the same error message and cannot pass authentication step. Please help. Our portal is now in 10.8.1

Badge +4

Also have the same problem on where to see log info and error messages.

Badge

Mine works, just do not put anything on the redirect URL. If I put anything in there or even just click on it. the web connector fails then you have to recreate the web connector again.

 

What I am having issues with at the moment is I am unable to run this workspace thru the task scheduler as tokens expire and require reauthenticate.

 

Is there a solution to re-authenticate? --- automatically so we can add the workspace in a task scheduler?

Badge +8

Hi @Lex Adove​ It is strange that your Web connection dialog crashes, this is not expected behavior. If you would like we can troubleshoot this further.

Is there a solution to re-authenticate? --- automatically so we can add the workspace in a task scheduler?

The refresh token should automatically get exchanged when the 25% of its life span is detected, so in theory, it should work without having to re-authenticate. But as you may be aware that these applications will always prompt you to re-authenticate after a longer duration similar to gmail etc)

The token expiration is control by Portal admin, and you should be able to set the token expiration life based on the instructions here (Specify the default token expiration time).

  1. Sign in to the ArcGIS Portal Directory as an administrator of your organization.
  2. The URL is in the format https://webadaptorhost.domain.com/webadaptorname/sharing/rest.
  3. Click Portals > Self.
  4. Scroll to the bottom of the page and click Update.
  5. Update the Max Token Expiration Minutes field with the desired value (in minutes). For example, enter 1440 to specify an expiration period of one day.
  6. Click Update Organization to apply your changes.

 

screenshot from our test portal https://www.screencast.com/t/eqPGdXyC

Badge +8

Hi @jhu_20​ and @Anh Phuong Tran​ 

Are you still having issue with creating app?

Have you referred to this article from Safe? If yes, can you verify that the redirect is also added to the application?

You can also use web debugging tools such as Fiddler to capture the response which would contain the error message. If you are still having issues, please let me know that I can help you resolve the issue.

Badge

Hi @Lex Adove​ It is strange that your Web connection dialog crashes, this is not expected behavior. If you would like we can troubleshoot this further.

Is there a solution to re-authenticate? --- automatically so we can add the workspace in a task scheduler?

The refresh token should automatically get exchanged when the 25% of its life span is detected, so in theory, it should work without having to re-authenticate. But as you may be aware that these applications will always prompt you to re-authenticate after a longer duration similar to gmail etc)

The token expiration is control by Portal admin, and you should be able to set the token expiration life based on the instructions here (Specify the default token expiration time).

  1. Sign in to the ArcGIS Portal Directory as an administrator of your organization.
  2. The URL is in the format https://webadaptorhost.domain.com/webadaptorname/sharing/rest.
  3. Click Portals > Self.
  4. Scroll to the bottom of the page and click Update.
  5. Update the Max Token Expiration Minutes field with the desired value (in minutes). For example, enter 1440 to specify an expiration period of one day.
  6. Click Update Organization to apply your changes.

 

screenshot from our test portal https://www.screencast.com/t/eqPGdXyC

Hi @rahulsharma​  Thanks for your reply. I forgot to mention that I have already seen that in our portal settings. However as part of our security, we were encouraged not to change the expiry of the tokens and make it as short as possible which still goes back to my original question of how or is there a possible way for FME to reauthenticate in the background for scheduled tasks?

Badge

Hi @Lex Adove​ It is strange that your Web connection dialog crashes, this is not expected behavior. If you would like we can troubleshoot this further.

Is there a solution to re-authenticate? --- automatically so we can add the workspace in a task scheduler?

The refresh token should automatically get exchanged when the 25% of its life span is detected, so in theory, it should work without having to re-authenticate. But as you may be aware that these applications will always prompt you to re-authenticate after a longer duration similar to gmail etc)

The token expiration is control by Portal admin, and you should be able to set the token expiration life based on the instructions here (Specify the default token expiration time).

  1. Sign in to the ArcGIS Portal Directory as an administrator of your organization.
  2. The URL is in the format https://webadaptorhost.domain.com/webadaptorname/sharing/rest.
  3. Click Portals > Self.
  4. Scroll to the bottom of the page and click Update.
  5. Update the Max Token Expiration Minutes field with the desired value (in minutes). For example, enter 1440 to specify an expiration period of one day.
  6. Click Update Organization to apply your changes.

 

screenshot from our test portal https://www.screencast.com/t/eqPGdXyC

Hi @rahulsharma​ , any new develop template for creating an Enterprise Web Portal Connector where we can embed our credentials in the authorization parameters or retrie token parameters?OAuth 

Regards

 

Badge +8

Hi @rahulsharma​ , any new develop template for creating an Enterprise Web Portal Connector where we can embed our credentials in the authorization parameters or retrie token parameters?OAuth 

Regards

 

Hi @Lex Adove​ , the best solution in your scenario is to use the default "Generate Token" authentication instead of using Oauth2.0

 

What is the Portal Authentication set up for your environment?

Do you have a user with a username/password that can access resources?

There are ways to get REST API to generate tokens at the start of the workbench, but again it would require a username/password (see Esri dev notes)

 

I can set up a workflow that can generate tokens and access the feature service via REST URLs (using ArcGIS Server Feature Service reader), but it would depend on the authentication methods used for the ArcGIS Enterprise.

 

 

Badge

Hi @rahulsharma​ , any new develop template for creating an Enterprise Web Portal Connector where we can embed our credentials in the authorization parameters or retrie token parameters?OAuth 

Regards

 

That would be much appreciated. Cheers

Badge +8

Hi @rahulsharma​ , any new develop template for creating an Enterprise Web Portal Connector where we can embed our credentials in the authorization parameters or retrie token parameters?OAuth 

Regards

 

Hi @Lex Adove​ Could you let me know the Portal Authentication method to get started?

Reply