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