<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Refresh Multiple Datasets from ADF in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-Multiple-Datasets-from-ADF/m-p/2666008#M37569</link>
    <description>&lt;P&gt;I've succesffuly set up refreshing a single power bi dataset from ADF, but now I need to be able to refresh multiple datasets within the same workspace from a single pipeline.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way I attempted to set this up is by creating a variable array that contains two dataset guids&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mpicca13_0-1658952269790.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755432i2FDC9D7369839570/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mpicca13_0-1658952269790.png" alt="mpicca13_0-1658952269790.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and in the ForEach Items field, referencing that variable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mpicca13_1-1658952358546.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755434i7753FDE009E0BF55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mpicca13_1-1658952358546.png" alt="mpicca13_1-1658952358546.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the first activity within the ForEach - WebActivity (which executes refresh of the dataset) would then reference item() in the URL where the dataset GUID would go.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mpicca13_2-1658952494829.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755439i4D586494132EE262/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mpicca13_2-1658952494829.png" alt="mpicca13_2-1658952494829.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the error I get back:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mpicca13_3-1658952534602.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755440i728AF8F433BF1A59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mpicca13_3-1658952534602.png" alt="mpicca13_3-1658952534602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again this worked for a single dataset refresh when referencing a parameter (single static dataset GUID) but now im trying to get this to work with refreshing multiple datasets by executing against the api in 2 concurrent executions using ForEach and 2 dataset GUIDs that I have stored in variable array..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the entire json of the pipe:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "name": "PBI Refresh Multiple Datasets Test_copy1",
    "properties": {
        "activities": [
            {
                "name": "Get TenantId from AKV",
                "type": "WebActivity",
                "dependsOn": [],
                "policy": {
                    "timeout": "0.00:10:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": true,
                    "secureInput": false
                },
                "userProperties": [],
                "typeProperties": {
                    "url": {
                        "value": "@concat(\n    'https://'\n    , pipeline().parameters.KeyVaultName\n    , '.vault.azure.net/secrets/TenantId/?api-version=7.1'\n    )",
                        "type": "Expression"
                    },
                    "method": "GET",
                    "httpRequestTimeout": "00:01:00",
                    "authentication": {
                        "type": "MSI",
                        "resource": {
                            "value": "https://vault.azure.net",
                            "type": "Expression"
                        }
                    }
                }
            },
            {
                "name": "Get ClientId from AKV",
                "type": "WebActivity",
                "dependsOn": [],
                "policy": {
                    "timeout": "0.00:10:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": true,
                    "secureInput": false
                },
                "userProperties": [],
                "typeProperties": {
                    "url": {
                        "value": "@concat(\n    'https://'\n    , pipeline().parameters.KeyVaultName\n    , '.vault.azure.net/secrets/ADO-PowerBI-SPN-AppID/?api-version=7.1'\n    )",
                        "type": "Expression"
                    },
                    "method": "GET",
                    "httpRequestTimeout": "00:01:00",
                    "authentication": {
                        "type": "MSI",
                        "resource": {
                            "value": "https://vault.azure.net",
                            "type": "Expression"
                        }
                    }
                }
            },
            {
                "name": "Get Secret from AKV",
                "type": "WebActivity",
                "dependsOn": [],
                "policy": {
                    "timeout": "0.00:10:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": true,
                    "secureInput": false
                },
                "userProperties": [],
                "typeProperties": {
                    "url": {
                        "value": "@concat(\n    'https://'\n    , pipeline().parameters.KeyVaultName\n    , '.vault.azure.net/secrets/ADO-PowerBI-SPN-Secret/?api-version=7.1'\n    )",
                        "type": "Expression"
                    },
                    "method": "GET",
                    "httpRequestTimeout": "00:01:00",
                    "authentication": {
                        "type": "MSI",
                        "resource": {
                            "value": "https://vault.azure.net",
                            "type": "Expression"
                        }
                    }
                }
            },
            {
                "name": "Get AAD Token",
                "type": "WebActivity",
                "dependsOn": [
                    {
                        "activity": "Get ClientId from AKV",
                        "dependencyConditions": [
                            "Succeeded"
                        ]
                    },
                    {
                        "activity": "Get TenantId from AKV",
                        "dependencyConditions": [
                            "Succeeded"
                        ]
                    },
                    {
                        "activity": "Get Secret from AKV",
                        "dependencyConditions": [
                            "Succeeded"
                        ]
                    }
                ],
                "policy": {
                    "timeout": "7.00:0:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": true,
                    "secureInput": true
                },
                "userProperties": [],
                "typeProperties": {
                    "url": {
                        "value": "@concat(\n    'https://login.microsoftonline.com/'\n    , activity('Get TenantId from AKV').output.value\n    , '/oauth2/v2.0/token'\n    )",
                        "type": "Expression"
                    },
                    "method": "POST",
                    "headers": {
                        "Content-Type": "application/x-www-form-urlencoded"
                    },
                    "body": {
                        "value": "@concat(\n    'grant_type=client_credentials&amp;amp;scope=https://analysis.windows.net/powerbi/api/.default&amp;amp;client_id=\n    ',activity('Get ClientId from AKV').output.value,'&amp;amp;client_secret=\n    ',encodeUriComponent(activity('Get Secret from AKV').output.value)\n)",
                        "type": "Expression"
                    },
                    "httpRequestTimeout": "00:01:00"
                }
            },
            {
                "name": "ForEach",
                "type": "ForEach",
                "dependsOn": [
                    {
                        "activity": "Get AAD Token",
                        "dependencyConditions": [
                            "Succeeded"
                        ]
                    }
                ],
                "userProperties": [],
                "typeProperties": {
                    "items": {
                        "value": "@variables('Datasets')",
                        "type": "Expression"
                    },
                    "isSequential": false,
                    "activities": [
                        {
                            "name": "Call dataset",
                            "type": "WebActivity",
                            "dependsOn": [],
                            "policy": {
                                "timeout": "0.00:10:00",
                                "retry": 0,
                                "retryIntervalInSeconds": 30,
                                "secureOutput": false,
                                "secureInput": true
                            },
                            "userProperties": [],
                            "typeProperties": {
                                "url": {
                                    "value": "@concat(\n    'https://api.powerbi.com/v1.0/myorg/groups/'\n    , pipeline().parameters.WorkspaceGuid\n    , '/datasets/'\n    , item()\n    , '/refreshes'\n    )",
                                    "type": "Expression"
                                },
                                "method": "POST",
                                "headers": {
                                    "Authorization": {
                                        "value": "@concat(\n    string(activity('Get AAD Token').output.token_type)\n    , ' '\n    , string(activity('Get AAD Token').output.access_token)\n    )",
                                        "type": "Expression"
                                    }
                                },
                                "body": {
                                    "notifyOption": "NoNotification"
                                },
                                "httpRequestTimeout": "00:01:00",
                                "authentication": {
                                    "type": "MSI",
                                    "resource": {
                                        "value": "https://vault.azure.net",
                                        "type": "Expression"
                                    }
                                }
                            }
                        },
                        {
                            "name": "Until datasets refresh",
                            "type": "Until",
                            "dependsOn": [
                                {
                                    "activity": "Call dataset",
                                    "dependencyConditions": [
                                        "Succeeded"
                                    ]
                                }
                            ],
                            "userProperties": [],
                            "typeProperties": {
                                "expression": {
                                    "value": "@not(\n    equals(\n        first(\n            json(\n                string(\n                    activity('Get dataset refresh status').output\n                )\n            ).value\n        ).status,'Unknown'\n    )\n)",
                                    "type": "Expression"
                                },
                                "activities": [
                                    {
                                        "name": "Get dataset refresh status",
                                        "type": "WebActivity",
                                        "dependsOn": [],
                                        "policy": {
                                            "timeout": "7.00:00:00",
                                            "retry": 0,
                                            "retryIntervalInSeconds": 30,
                                            "secureOutput": false,
                                            "secureInput": true
                                        },
                                        "userProperties": [],
                                        "typeProperties": {
                                            "url": {
                                                "value": "@concat(\n    'https://api.powerbi.com/v1.0/myorg/groups/'\n    ,pipeline().parameters.WorkspaceGuid\n    ,'/datasets/',item()\n    ,'/refreshes?$top=1'\n    )",
                                                "type": "Expression"
                                            },
                                            "method": "GET",
                                            "headers": {
                                                "Authorization": {
                                                    "value": "@concat(\n    string(activity('Get AAD Token').output.token_type)\n    , ' '\n    , string(activity('Get AAD Token').output.access_token)\n    )",
                                                    "type": "Expression"
                                                },
                                                "Content-Type": "application/json"
                                            }
                                        }
                                    },
                                    {
                                        "name": "If dataset refresh unknown wait",
                                        "type": "IfCondition",
                                        "dependsOn": [
                                            {
                                                "activity": "Get dataset refresh status",
                                                "dependencyConditions": [
                                                    "Succeeded"
                                                ]
                                            }
                                        ],
                                        "userProperties": [],
                                        "typeProperties": {
                                            "expression": {
                                                "value": "@equals(\n    first(\n        json(\n            string(\n                activity('Get dataset refresh status').output\n            )\n        ).value\n    ).status,'Unknown'\n)",
                                                "type": "Expression"
                                            },
                                            "ifTrueActivities": [
                                                {
                                                    "name": "wait 120 seconds_copy1",
                                                    "type": "Wait",
                                                    "dependsOn": [],
                                                    "userProperties": [],
                                                    "typeProperties": {
                                                        "waitTimeInSeconds": 120
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                ],
                                "timeout": "0.03:00:00"
                            }
                        },
                        {
                            "name": "If dataset refresh",
                            "type": "IfCondition",
                            "dependsOn": [
                                {
                                    "activity": "Until datasets refresh",
                                    "dependencyConditions": [
                                        "Succeeded"
                                    ]
                                }
                            ],
                            "userProperties": [],
                            "typeProperties": {
                                "expression": {
                                    "value": "@equals(\n    first(\n        json(\n            string(\n                activity('Get dataset refresh status').output\n            )\n        ).value\n    ).status,'Failed'\n)",
                                    "type": "Expression"
                                },
                                "ifTrueActivities": [
                                    {
                                        "name": "Fail_copy1",
                                        "type": "Fail",
                                        "dependsOn": [],
                                        "userProperties": [],
                                        "typeProperties": {
                                            "message": {
                                                "value": "@string(\n    json(\n        first(\n            json(\n                string(\n                    activity('Get dataset refresh status').output\n                )\n            ).value\n        ).serviceExceptionJson\n    )\n)",
                                                "type": "Expression"
                                            },
                                            "errorCode": "1000"
                                        }
                                    }
                                ]
                            }
                        }
                    ]
                }
            }
        ],
        "concurrency": 2,
        "parameters": {
            "KeyVaultName": {
                "type": "string",
                "defaultValue": "keyvault"
            },
            "WorkspaceGuid": {
                "type": "string",
                "defaultValue": "xxxxx-xxx-xxxx-xxxxxxxxxxxxxxxxxxxxx"
            }
        },
        "variables": {
            "Datasets": {
                "type": "Array",
                "defaultValue": [
                    "xxxxx-xxx-xxxx-xxxxxxxxxxxxxxxxxxxxx",
                    "xxxxx-xxx-xxxx-xxxxxxxxxxxxxxxxxxxxx"
                ]
            }
        },
        "folder": {
            "name": "UAT"
        },
        "annotations": []
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 20:16:53 GMT</pubDate>
    <dc:creator>mpicca13</dc:creator>
    <dc:date>2022-07-27T20:16:53Z</dc:date>
    <item>
      <title>Refresh Multiple Datasets from ADF</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-Multiple-Datasets-from-ADF/m-p/2666008#M37569</link>
      <description>&lt;P&gt;I've succesffuly set up refreshing a single power bi dataset from ADF, but now I need to be able to refresh multiple datasets within the same workspace from a single pipeline.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way I attempted to set this up is by creating a variable array that contains two dataset guids&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mpicca13_0-1658952269790.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755432i2FDC9D7369839570/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mpicca13_0-1658952269790.png" alt="mpicca13_0-1658952269790.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and in the ForEach Items field, referencing that variable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mpicca13_1-1658952358546.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755434i7753FDE009E0BF55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mpicca13_1-1658952358546.png" alt="mpicca13_1-1658952358546.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the first activity within the ForEach - WebActivity (which executes refresh of the dataset) would then reference item() in the URL where the dataset GUID would go.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mpicca13_2-1658952494829.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755439i4D586494132EE262/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mpicca13_2-1658952494829.png" alt="mpicca13_2-1658952494829.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the error I get back:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mpicca13_3-1658952534602.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755440i728AF8F433BF1A59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mpicca13_3-1658952534602.png" alt="mpicca13_3-1658952534602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again this worked for a single dataset refresh when referencing a parameter (single static dataset GUID) but now im trying to get this to work with refreshing multiple datasets by executing against the api in 2 concurrent executions using ForEach and 2 dataset GUIDs that I have stored in variable array..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the entire json of the pipe:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "name": "PBI Refresh Multiple Datasets Test_copy1",
    "properties": {
        "activities": [
            {
                "name": "Get TenantId from AKV",
                "type": "WebActivity",
                "dependsOn": [],
                "policy": {
                    "timeout": "0.00:10:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": true,
                    "secureInput": false
                },
                "userProperties": [],
                "typeProperties": {
                    "url": {
                        "value": "@concat(\n    'https://'\n    , pipeline().parameters.KeyVaultName\n    , '.vault.azure.net/secrets/TenantId/?api-version=7.1'\n    )",
                        "type": "Expression"
                    },
                    "method": "GET",
                    "httpRequestTimeout": "00:01:00",
                    "authentication": {
                        "type": "MSI",
                        "resource": {
                            "value": "https://vault.azure.net",
                            "type": "Expression"
                        }
                    }
                }
            },
            {
                "name": "Get ClientId from AKV",
                "type": "WebActivity",
                "dependsOn": [],
                "policy": {
                    "timeout": "0.00:10:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": true,
                    "secureInput": false
                },
                "userProperties": [],
                "typeProperties": {
                    "url": {
                        "value": "@concat(\n    'https://'\n    , pipeline().parameters.KeyVaultName\n    , '.vault.azure.net/secrets/ADO-PowerBI-SPN-AppID/?api-version=7.1'\n    )",
                        "type": "Expression"
                    },
                    "method": "GET",
                    "httpRequestTimeout": "00:01:00",
                    "authentication": {
                        "type": "MSI",
                        "resource": {
                            "value": "https://vault.azure.net",
                            "type": "Expression"
                        }
                    }
                }
            },
            {
                "name": "Get Secret from AKV",
                "type": "WebActivity",
                "dependsOn": [],
                "policy": {
                    "timeout": "0.00:10:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": true,
                    "secureInput": false
                },
                "userProperties": [],
                "typeProperties": {
                    "url": {
                        "value": "@concat(\n    'https://'\n    , pipeline().parameters.KeyVaultName\n    , '.vault.azure.net/secrets/ADO-PowerBI-SPN-Secret/?api-version=7.1'\n    )",
                        "type": "Expression"
                    },
                    "method": "GET",
                    "httpRequestTimeout": "00:01:00",
                    "authentication": {
                        "type": "MSI",
                        "resource": {
                            "value": "https://vault.azure.net",
                            "type": "Expression"
                        }
                    }
                }
            },
            {
                "name": "Get AAD Token",
                "type": "WebActivity",
                "dependsOn": [
                    {
                        "activity": "Get ClientId from AKV",
                        "dependencyConditions": [
                            "Succeeded"
                        ]
                    },
                    {
                        "activity": "Get TenantId from AKV",
                        "dependencyConditions": [
                            "Succeeded"
                        ]
                    },
                    {
                        "activity": "Get Secret from AKV",
                        "dependencyConditions": [
                            "Succeeded"
                        ]
                    }
                ],
                "policy": {
                    "timeout": "7.00:0:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": true,
                    "secureInput": true
                },
                "userProperties": [],
                "typeProperties": {
                    "url": {
                        "value": "@concat(\n    'https://login.microsoftonline.com/'\n    , activity('Get TenantId from AKV').output.value\n    , '/oauth2/v2.0/token'\n    )",
                        "type": "Expression"
                    },
                    "method": "POST",
                    "headers": {
                        "Content-Type": "application/x-www-form-urlencoded"
                    },
                    "body": {
                        "value": "@concat(\n    'grant_type=client_credentials&amp;amp;scope=https://analysis.windows.net/powerbi/api/.default&amp;amp;client_id=\n    ',activity('Get ClientId from AKV').output.value,'&amp;amp;client_secret=\n    ',encodeUriComponent(activity('Get Secret from AKV').output.value)\n)",
                        "type": "Expression"
                    },
                    "httpRequestTimeout": "00:01:00"
                }
            },
            {
                "name": "ForEach",
                "type": "ForEach",
                "dependsOn": [
                    {
                        "activity": "Get AAD Token",
                        "dependencyConditions": [
                            "Succeeded"
                        ]
                    }
                ],
                "userProperties": [],
                "typeProperties": {
                    "items": {
                        "value": "@variables('Datasets')",
                        "type": "Expression"
                    },
                    "isSequential": false,
                    "activities": [
                        {
                            "name": "Call dataset",
                            "type": "WebActivity",
                            "dependsOn": [],
                            "policy": {
                                "timeout": "0.00:10:00",
                                "retry": 0,
                                "retryIntervalInSeconds": 30,
                                "secureOutput": false,
                                "secureInput": true
                            },
                            "userProperties": [],
                            "typeProperties": {
                                "url": {
                                    "value": "@concat(\n    'https://api.powerbi.com/v1.0/myorg/groups/'\n    , pipeline().parameters.WorkspaceGuid\n    , '/datasets/'\n    , item()\n    , '/refreshes'\n    )",
                                    "type": "Expression"
                                },
                                "method": "POST",
                                "headers": {
                                    "Authorization": {
                                        "value": "@concat(\n    string(activity('Get AAD Token').output.token_type)\n    , ' '\n    , string(activity('Get AAD Token').output.access_token)\n    )",
                                        "type": "Expression"
                                    }
                                },
                                "body": {
                                    "notifyOption": "NoNotification"
                                },
                                "httpRequestTimeout": "00:01:00",
                                "authentication": {
                                    "type": "MSI",
                                    "resource": {
                                        "value": "https://vault.azure.net",
                                        "type": "Expression"
                                    }
                                }
                            }
                        },
                        {
                            "name": "Until datasets refresh",
                            "type": "Until",
                            "dependsOn": [
                                {
                                    "activity": "Call dataset",
                                    "dependencyConditions": [
                                        "Succeeded"
                                    ]
                                }
                            ],
                            "userProperties": [],
                            "typeProperties": {
                                "expression": {
                                    "value": "@not(\n    equals(\n        first(\n            json(\n                string(\n                    activity('Get dataset refresh status').output\n                )\n            ).value\n        ).status,'Unknown'\n    )\n)",
                                    "type": "Expression"
                                },
                                "activities": [
                                    {
                                        "name": "Get dataset refresh status",
                                        "type": "WebActivity",
                                        "dependsOn": [],
                                        "policy": {
                                            "timeout": "7.00:00:00",
                                            "retry": 0,
                                            "retryIntervalInSeconds": 30,
                                            "secureOutput": false,
                                            "secureInput": true
                                        },
                                        "userProperties": [],
                                        "typeProperties": {
                                            "url": {
                                                "value": "@concat(\n    'https://api.powerbi.com/v1.0/myorg/groups/'\n    ,pipeline().parameters.WorkspaceGuid\n    ,'/datasets/',item()\n    ,'/refreshes?$top=1'\n    )",
                                                "type": "Expression"
                                            },
                                            "method": "GET",
                                            "headers": {
                                                "Authorization": {
                                                    "value": "@concat(\n    string(activity('Get AAD Token').output.token_type)\n    , ' '\n    , string(activity('Get AAD Token').output.access_token)\n    )",
                                                    "type": "Expression"
                                                },
                                                "Content-Type": "application/json"
                                            }
                                        }
                                    },
                                    {
                                        "name": "If dataset refresh unknown wait",
                                        "type": "IfCondition",
                                        "dependsOn": [
                                            {
                                                "activity": "Get dataset refresh status",
                                                "dependencyConditions": [
                                                    "Succeeded"
                                                ]
                                            }
                                        ],
                                        "userProperties": [],
                                        "typeProperties": {
                                            "expression": {
                                                "value": "@equals(\n    first(\n        json(\n            string(\n                activity('Get dataset refresh status').output\n            )\n        ).value\n    ).status,'Unknown'\n)",
                                                "type": "Expression"
                                            },
                                            "ifTrueActivities": [
                                                {
                                                    "name": "wait 120 seconds_copy1",
                                                    "type": "Wait",
                                                    "dependsOn": [],
                                                    "userProperties": [],
                                                    "typeProperties": {
                                                        "waitTimeInSeconds": 120
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                ],
                                "timeout": "0.03:00:00"
                            }
                        },
                        {
                            "name": "If dataset refresh",
                            "type": "IfCondition",
                            "dependsOn": [
                                {
                                    "activity": "Until datasets refresh",
                                    "dependencyConditions": [
                                        "Succeeded"
                                    ]
                                }
                            ],
                            "userProperties": [],
                            "typeProperties": {
                                "expression": {
                                    "value": "@equals(\n    first(\n        json(\n            string(\n                activity('Get dataset refresh status').output\n            )\n        ).value\n    ).status,'Failed'\n)",
                                    "type": "Expression"
                                },
                                "ifTrueActivities": [
                                    {
                                        "name": "Fail_copy1",
                                        "type": "Fail",
                                        "dependsOn": [],
                                        "userProperties": [],
                                        "typeProperties": {
                                            "message": {
                                                "value": "@string(\n    json(\n        first(\n            json(\n                string(\n                    activity('Get dataset refresh status').output\n                )\n            ).value\n        ).serviceExceptionJson\n    )\n)",
                                                "type": "Expression"
                                            },
                                            "errorCode": "1000"
                                        }
                                    }
                                ]
                            }
                        }
                    ]
                }
            }
        ],
        "concurrency": 2,
        "parameters": {
            "KeyVaultName": {
                "type": "string",
                "defaultValue": "keyvault"
            },
            "WorkspaceGuid": {
                "type": "string",
                "defaultValue": "xxxxx-xxx-xxxx-xxxxxxxxxxxxxxxxxxxxx"
            }
        },
        "variables": {
            "Datasets": {
                "type": "Array",
                "defaultValue": [
                    "xxxxx-xxx-xxxx-xxxxxxxxxxxxxxxxxxxxx",
                    "xxxxx-xxx-xxxx-xxxxxxxxxxxxxxxxxxxxx"
                ]
            }
        },
        "folder": {
            "name": "UAT"
        },
        "annotations": []
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 20:16:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Refresh-Multiple-Datasets-from-ADF/m-p/2666008#M37569</guid>
      <dc:creator>mpicca13</dc:creator>
      <dc:date>2022-07-27T20:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh Multiple Datasets from ADF</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-Multiple-Datasets-from-ADF/m-p/2666344#M37575</link>
      <description>&lt;P&gt;I came up with a workaround, i just set each distinct guid to a parameter and make a copy of the call dataset activity to refresh each dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mpicca13_1-1658977240020.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755552iBACC1AE173D72478/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mpicca13_1-1658977240020.png" alt="mpicca13_1-1658977240020.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 03:00:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Refresh-Multiple-Datasets-from-ADF/m-p/2666344#M37575</guid>
      <dc:creator>mpicca13</dc:creator>
      <dc:date>2022-07-28T03:00:57Z</dc:date>
    </item>
  </channel>
</rss>

