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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
KevinSGoff
Helper I
Helper I

Using an EmbedURL right after publishing a new report

Here's my situation:  we are using Power BI Premium, and we have a Powershell script to automate deployment of PBIX files to the Cloud. I'm able to "capture" the EmbedURL after using Powershell and the API to get the embedded URL.

 

We want to take that URL and slap it "back" into a larger web menu system, so that the user can run the report by clicking on a link that will be tied to that embedded URL.

 

However, every time, the  user is promoted to "Please sign in to view the report", even if the user (who has a free PBI account) has previously signed into PBI  (but maybe closed the browser five minutes ago)

 

Here's the code I'm using.....my question, is there something (in addition to jamming in a "&autoAuth=true") I can add, so that the user won't need to be prompted?    The user is already signed into the domain, AND that domain user would have already been given a free PBI license in O365 Admin.    So trying to keep them from getting that "Please sign in to view the report" 

 

Also...I realize there might be some other options, but it's a requirement that the URL for the PBI report is part of another web menu app, and launchable from there.    thanks

 

[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12


[securestring]$secStringPassword = ConvertTo-SecureString $Password -AsPlainText -Force


[pscredential]$credObject = New-Object System.Management.Automation.PSCredential ($UserName, $secStringPassword)


Connect-PowerBIServiceAccount -Credential $credObject


$NewReport = New-PowerBIReport -Path $SourceFileName -Name $BaseReportName -Workspace

            (Get-PowerBIWorkspace -Name $CloudFolder ) -ConflictAction CreateOrOverwrite

 

Write-Host "New Report Object URL"
Write-Host $NewReport.EmbedURL   -- grab this in the powershell script and "jam" it back into our web application

 

I'm able to capture that EmbedURL and slap an additional &autoAuth=true

1 ACCEPTED SOLUTION
v-mengzhu-msft
Community Support
Community Support

Hi @KevinSGoff ,

 

Are you trying to take steps to avoid users having to log in every time they enter a site with embedded reports?

May be your goal cannot be achieved, as the following said “ report access is required “, so when user access your embedded report in website, they all need to sign-in

vmengzhumsft_0-1657868177608.png

Embed a report in a secure portal or website - Power BI | Microsoft Docs

If you want to avoid this situation, you can consider to use Power BI embedded analytics

This doc can help you learn more about this function: Power BI embedded analytics overview - Power BI | Microsoft Docs

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-mengzhu-msft
Community Support
Community Support

Hi @KevinSGoff ,

 

Are you trying to take steps to avoid users having to log in every time they enter a site with embedded reports?

May be your goal cannot be achieved, as the following said “ report access is required “, so when user access your embedded report in website, they all need to sign-in

vmengzhumsft_0-1657868177608.png

Embed a report in a secure portal or website - Power BI | Microsoft Docs

If you want to avoid this situation, you can consider to use Power BI embedded analytics

This doc can help you learn more about this function: Power BI embedded analytics overview - Power BI | Microsoft Docs

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors