Unable to retrieve feature layers when setting up ArcGIS Connector in Microsoft Power Automate

5237
28
08-06-2022 10:25 AM
KevinMantels
Occasional Contributor

I am trying to create a new automated cloud flow in Microsoft Power Automate using the ArcGIS for Power Automate connector and its available triggers.  Regardless of which trigger I use, when I attempt to select the feature layer to be tracked I receive the following error message: "Could not retrieve values.  The dynamic invocation request failed with error: Unexpected error occurred when calling the APIHubsRuntime API: ...".  A screenshot of the error message is below.

I have confirmed that the ArcGIS for Power Automate connector has the correct credentials for my ArcGIS Online account and is connected.  I have a premium Power Automate account, so even though ArcGIS is a premium connector I do not believe that would be the issue.  I am using Power Automate in a government environment, and I have noticed that the connectors that are available in my government account are limited compared to those available in commercial accounts, but I am uncertain if that could be causing these issues.  Lastly, for what it's worth, I am able to create flows with the Survey123 connector without any issue.  I realize they are two completely different connectors, but I am still mentioning in case it is relevant.

I am not sure if I am missing some steps or settings.  The Survey123 connector worked out of the box, so I had assumed the ArcGIS connector would as well.  Bottom line is I am out of troubleshooting ideas at this point.  Any assistance would be greatly appreciated.

KevinMantels_0-1659805702267.png

0 Kudos
28 Replies
ColForbin
Frequent Contributor

Hi @NataliyaLys , Are you seeing any errors?  My ArcGIS Get data from feature layer step in my flow times out after 7 retries with GatewayTimeout errors. 

0 Kudos
NataliyaLys
Frequent Contributor

@ColForbin  When I click on ArcGIS Connection details this is an error that I see: Failed to refresh access token for service: oauth2generic. Correlation Id=060bdd10-4b4e-1d38-dc39-ab2040cfae25, UTC TimeStamp=6/9/2025 7:59:10 PM, Error: OAuth 2 access token refresh failed. Access token request to https://unitedstates-002.azure-apim.net/proxy/api/authentication/oauth2/token failed. Client ID and secret sent in form body. Details: A task was canceled.. Response status code=InternalServerError. Response body:

NataliyaLys_0-1749499719071.png

If I click 'Reconnect' it appears to reestablish connection, but my flows still fail. And if I try to fix connection within a flow it just spins and it never gives me a list of feature services from my content. 

 

0 Kudos
ColForbin
Frequent Contributor

@NataliyaLys I'm seeing the same.  Also when I go to the Connections page in Power Automate, I see this:

ColForbin_0-1749500468468.png

 

And when I click Reconnect, a window pops up and appears to sign into AGOL again and in shows "Connected" on the connections page.  The page will shows "Reconnect" again if I refresh it after a while.

ArcGIS Online health dashboard shows no issues and MS Power Platform shows no issues either.

0 Kudos
AkshayHarshe
Esri Contributor

Hi @ColForbin There has been an issue with the ArcGIS for Power automate containers since this morning, we are working hard to get to the bottom of the issue. We are sorry for the inconvenience this has caused.

Thanks,
Akshay Harshe
0 Kudos
ColForbin
Frequent Contributor

@AkshayHarshe  I just did a test with one of my flows and it seems the issue is resolved - thanks!

0 Kudos
CORFOPYM_Ingenieria
Emerging Contributor

I have the same problem, please help.

0 Kudos
ColForbin
Frequent Contributor

@CORFOPYM_Ingenieria  try testing it today, I believe they fixed this.

0 Kudos
CORFOPYM_Ingenieria
Emerging Contributor

Thanks, it's working now

0 Kudos
ColForbin
Frequent Contributor

I created a flow in MS Power Automate to hopefully mitigate any more issues with this.  Here is what I did.

  1. Create a cloud flow that is triggered by Recurrence and set it to run daily.
  2. Add a step for ArcGIS - Get data from feature layer.
  3. Choose a feature layer from your content that will never be removed.
  4. Add a Scope Control action and configure the Run after settings to be: has failed, is skipped, has timed out.
  5. In that Scope Control add a "Send email" action to email yourself.  This way, if the connection to ArcGIS times out or fails, you will get an email.  When successful, this shoulda also update the security token for the ArcGIS Connectio.

ColForbin_0-1749753661493.png

 

ColForbin_1-1749753726164.png

 

hopefully this helps

0 Kudos