Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
BlowfishUK
New Member

Devscope PowerBIPS Modules

Hi,

 

I am using the Devscope PowerBIPS Modules to send data directly to a PowerBI dataset from a PowerShell script.

 

I am having a problem with authentication. When first run, the acquisition of an authentication token requires you click accept to allow the Devscope app permission to access the dataset. Provided the PowerShell window isn't closed, you can acquire a new token without issue.

 

However, if the PowerShell window is closed, you have to authorise the app again which can only be done GUI driven which makes it useless for automated scripting.

 

I have read that this is to do with the user account used to authenticate to PowerBI.The Devscope modules can work with a custom Azure App and in this case, you can create a user in Azure AD with the necessary permission.

 

I am using it with regular Office 365 and so there is no access to Azure AD apart from signing into the Portal and assigning PowerBI licenses. This has been done.

 

Has anyone been able to successfully use the Get-PBIAuthToken cmdlet specifying both username and password parameters without the need to first run Get-PBIAuthToken and use the GUI to enter credentials and click Accept to authorise the app?

 

The DevScope module is very powerful by allowing you to push data directly into PowerBI but is not usedul if you have to manually authorise each PowerShell session first.

1 ACCEPTED SOLUTION
BlowfishUK
New Member

Managed to figure this out.

 

You need to have your Office 365 Directory linked to Azure AD. When this is done, you can use the Client ID from the Native Client App along with a username and password for a user in your Office 365 tenancy that is licensed for PowerBI.

 

I am now able to fully automate uploading data to PowerBI as acquiring the authentication token no longer requires initial manual authorisation.

 

Reference article for Azure App configuration is here: https://msdn.microsoft.com/en-us/library/dn877542.aspx

 

I didn't realise but one of my colleagues had already exposed the 365 directory to Azure AD. Don't know how it was done though!

View solution in original post

3 REPLIES 3
BlowfishUK
New Member

Managed to figure this out.

 

You need to have your Office 365 Directory linked to Azure AD. When this is done, you can use the Client ID from the Native Client App along with a username and password for a user in your Office 365 tenancy that is licensed for PowerBI.

 

I am now able to fully automate uploading data to PowerBI as acquiring the authentication token no longer requires initial manual authorisation.

 

Reference article for Azure App configuration is here: https://msdn.microsoft.com/en-us/library/dn877542.aspx

 

I didn't realise but one of my colleagues had already exposed the 365 directory to Azure AD. Don't know how it was done though!

That link is dead. And it tells us to move on to another link that is dead. And then  recommends a bunch  of other top-level links.

Anyone know where we should look these days?

That link is dead. And it tells us to move on to another link that is dead. And then  recommends a bunch  of other top-level links.

Anyone know where we should look these days?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors