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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.