Appreciate for your advice if there is other approach i could try out..
I would like to run the ADF pipeline via RestFul API / .Net SDK and I have followed through the Microsoft tutorial for this.
Microsoft Run ADF Pipeline link via Restful / SDK
Understand that Contributor role has to be assigned to the application (Subscription level). However, assignment of contributor at subscription level is not allowed at my Client environment due to the security policy. Contributor role entitlement only allowed at resource group level.
Hence, may i have your advice if there is any other approach i could run ADF pipeline without assignment of contributor role at subscription level?
Below is the error message i gotten from my c# program:
System.AggregateException
HResult=0x80131500
Message=One or more errors occurred.
Source=mscorlib
StackTrace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean
includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean
waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at ADFv2QuickStart.Program.Main(String[] args) in
C:\Users\ADFv2QuickStart\Program.cs:line 59
Inner Exception 1:
CloudException: The client 'xxxxxx' with
object id 'xxxxxx' does not have authorization
to perform action
'Microsoft.DataFactory/factories/pipelines/createRun/action' over scope
'/subscriptions/xxxxxxxx/resourceGroups/rg-xxx/providers/Microsoft.DataFactory/factories/adf-xxxx/pipelines/pipeline12'.
The Contributor role at the resource group level is enough, I start a run of a pipeline via powershell, it works fine. The command essentially calls the REST API : Pipelines - Create Run, so you will also be able to invoke the REST API directly.
Invoke-AzDataFactoryV2Pipeline -ResourceGroupName joywebapp -DataFactoryName joyfactoryv2 -PipelineName pipeline1
Get-AzDataFactoryV2PipelineRun -ResourceGroupName joywebapp -DataFactoryName joyfactoryv2 -PipelineRunId "xxxxxxx"
In the screenshot, you will find if I get the web app in another resource group, it will give the error, so we can make sure the role is working. Invoke-AzDataFactoryV2Pipeline
will return the RunId
, just pass it in the Get-AzDataFactoryV2PipelineRun
, you can get the details of the PipelineRun.
Catch the request, we could find what I mentioned above, it calls the REST API. It is the same with the one in the link in your question.
User contributions licensed under CC BY-SA 3.0