cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AUaero Member
Member

Power BI Auto Login

Hi,

 

We have developed a Power BI report to display several daily and monthly KPIs.  We want to display the report on large monitors in our manufacturing facility.  One of our concerns is how to automatically launch the report after a reboot (i.e. computer updates, power failure etc.) 

 

We've set up the user account to auto login on start up and we can set up a script to automatically launch powerbi.com in a browser after login, but is there a way to automatically login and display the desired report?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Power BI Auto Login

@AUaero Just checking around the web it appears that you could script something to auto log in, but I'm not going to recommend anything as I've never done it and it deals with areas I'm unfamiliar with. If you can get a process to kick off and log in to Power BI, you can set a particular dashboard as your favorite and that will always show up after log in.. but I'm not aware of being able to navigate to a particular report.

If you have a report page, you could pin the report page to a dashboard and make that your favorite, which might get you close to what you want... no garauntee's though.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

9 REPLIES 9
ankitpatira Super Contributor
Super Contributor

Re: Power BI Auto Login

@AUaero

One way to do is to use Publish to web feature. That will give you a URL for your report that you can launch via script on computer restart and so you don't need to worry about login or anything. Obviously that feature makes your report available to anyone who has that link but it's upto you to pass that link to anybody.
AUaero Member
Member

Re: Power BI Auto Login

Ankit, thanks for your reply.

 

So there is no way to secure this data?  I'm a little leery of publishing proprietary data to the public web and relying on security through URL obscurity.

 

Are there any alterantive solutions?  Surely someone else has a had a similar requirement for a kiosk mode type application using Power BI.

 

Thanks!

Super User
Super User

Re: Power BI Auto Login

@AUaero Just checking around the web it appears that you could script something to auto log in, but I'm not going to recommend anything as I've never done it and it deals with areas I'm unfamiliar with. If you can get a process to kick off and log in to Power BI, you can set a particular dashboard as your favorite and that will always show up after log in.. but I'm not aware of being able to navigate to a particular report.

If you have a report page, you could pin the report page to a dashboard and make that your favorite, which might get you close to what you want... no garauntee's though.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

AUaero Member
Member

Re: Power BI Auto Login

Ankit, after further investigation it appears that publish to web does not work with pro content.  My report is linked to my on-prem analysis services instance.

 

Any other ideas for how to use Power BI to publish KPIs in a kiosk mode?

pyk Occasional Visitor
Occasional Visitor

Re: Power BI Auto Login

Hi can you share how do you set up the user account to auto login on start up? We hope to use our application to auto fill in user's account and password to offload their need to remember 1 more account/pwd. Thank you.

AUaero Member
Member

Re: Power BI Auto Login

Hi pyk,

 

If you're looking for help on setting a PC up to automatically login a user at startup, try here.  If you're talking about automatically logging in to Power BI, the best I could do was make sure that the box was checked to remember the user's password when initially logging in.  We've got a Powershell script that launches IE and navigates to the desired Power BI report, but this only works as long as a) you've checked the box to remember the password, and b) the user's password hasn't been changed.

 

DomA001 Frequent Visitor
Frequent Visitor

Re: Power BI Auto Login

Hi @AUaero 

 

Would you be able to share the script?

AUaero Member
Member

Re: Power BI Auto Login

This code isn't in production any more, so I can't assure you that it still works, but this is what we used in 2017.

 

<#*****************************************************************************

 This script will launch a report on powerbi.com.  After 
 opening the report, the script sets focus to IE, brings the IE window to the 
 foreground, and sets the powerbi app to full screen mode.

 This script will not function if powerbi.com has not been previously opened 
 on the computer the the script is ran on with the option for the app to 
 remember the current username.

*******************************************************************************#>

# Set report URL
$URL = <Your_Report_URL_Here>

# Open an IE window and navigate to the URL
$ie = New-Object -com internetexplorer.application
$ie.visible = $true
$ie.FullScreen = $true
$ie.navigate($URL)

# Wait on IE to load page
while ($ie.Busy -eq $true)
{
    Start-Sleep -Milliseconds 100
}

# Bring IE to the foreground
$code=@'
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

static public class Win32{ 
	[DllImport("user32.dll")]
  	[return: MarshalAs(UnmanagedType.Bool)]
  	static public extern bool SetForegroundWindow(IntPtr hWnd);
}
'@
 Add-Type $code 

$handles=(get-process iexplore).MainWindowHandle
$handles|%{[win32]::SetForegroundWindow($_)}

# Set Power BI Fullscreen
$fs = $ie.Document.Body.getElementsByClassName('glyphicon glyph-small pbi-glyph-fullscreen') | Select-Object -first 1
$fs.click()
AUaero Member
Member

Re: Power BI Auto Login

Apparently the message board software interprets a colon followed by an "S" as a smiley face.

The part with the smiley should be

$handles|%{[win32]::SetForegroundWindow($_)}

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (1,303)