I was trying to invoke data factory pipeline from azure function programmatically. Its throwing following error.
link: http://eatcodelive.com/2016/02/24
Solution:
The below code works for me. Please try out in power shell after logged in with Azure credential.
Implementation:
$azureAdApplication = New-AzureRmADApplication -DisplayName -HomePage -IdentifierUris -Password
New-AzureRmRoleAssignment -RoleDefinitionName "Data Factory Contributor" -ServicePrincipalName $azureAdApplication.ApplicationId