1. Dataverse Instance (Model or Canvas) – Current POC is Model Driven

2. ArcGIS Developer license

3. Power Automate Cloud Flow

Description: This process assumes you have setup ArcGIS Authentication Token and have imported data into the current identified feature layer. If not how to setup token via ArcGIS can be seen in this blog article of mine 🙂

3.1: Power Automate Flow Structure:

3.2: Trigger Action:

3.3: Variables:

ObjectID – Initiating string variable.

array – Initiating array variable.

3.4: Check if ObjectID exists

Description:  Check Object ID if exists in Dataverse. If so this will set variable.

3.5: Authenticate to ArcGIS

Description: Authenticate to ArcGIS and gather Token.

Use Flow HTTP Response

3.5.1 Method: Post - Token

URI: https://www.arcgis.com/sharing/rest/generateToken

Headers: Content-Type - application/x-www-form-urlencoded


Body: username=pizzaman&password=@ieatawholelottapiza21&f=json&referer=https://services.arcgis.com/2QB0rRKkJstkbH5P/arcgis/rest/services/commonopdash/FeatureServer/0

URI - https://www.arcgis.com/sharing/rest/generateToken
Headers - using the specified Header breaks the formatted response properly to be accepted by API encoding via "&" character and "=" character along with specific values in the string itself.

"the keys and values are encoded in key-value tuples separated by '&', with a '=' between the key and the value. Non-alphanumeric characters in both keys and values are percent encoded: this is the reason why this type is not suitable to use with binary data (use multipart/form-data instead)"

Body username & pass - use current credentials
Body Referer - If you refer to the specific feature layer created for integration. 



referer=https://services.arcgis.com/2QB0rRKkJstkbH5P/arcgis/rest/services/commonopdash/FeatureServer/0

3.6 Parse JSON of Authentication Token:

Description: Parse Token response from JSON Body to use Token for further Http requests.

{
    "type": "object",
    "properties": {
        "token": {
            "type": "string"
        },
        "expires": {
            "type": "integer"
        },
        "ssl": {
            "type": "boolean"
        }
    }
}