Azure APP using Service Principal to Refresh Dataset from Powershell

Ajay 1 Reputation point
2020-04-13T14:42:51.363+00:00

Hi,
I am trying to automate the process of refreshing dataset of powerBI and integrate that into my SSIS ETL load so that right after data loads, I have my dataset refreshed automatically from powershell script.
I have API created with type server side web app which registers a new APP on Azure AD where I have given both read & write Dataset.ALL permission.
I have added this app to a security group in Azure AD and enabled "Allow Service Principal to access PowerBI API" at Admin settings in PowerBI
I have added the Service Principal Name to PowerBI workspace as admin
Now using the APP ID & APP Secret and tenant ID I am trying to authenticate from Powershell and refresh the dataset however I get an error Unauthorized in Powershell

Please help or guide

Thanks,
--Archer

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,451 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,806 Reputation points Microsoft Employee
    2020-04-13T19:03:49.837+00:00

    I suggest you to please reach out to PowerBI community with your question where you can find community presence specific to PowerBI and they will help you.
    Also, check the documentation if you are not missing anything.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.