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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Power BI Paginated Report User!UserID not same for parameters and body when embedding

When embedding a Power BI Paginated report as App Owns Data (ISV) the built-in field User!UserID, which holds the username property of the identity element, is different when used in report paramenters compared to when it is used in the body.

 

Apparently the User!UserID when executed in the context of the paramenters pane holds the GUID of the SPN (App ID) and not the username property which is expected.

 

See an example here of a simple Paginated report where the body has a text box with the value set as an expression User!UserID. Same expression is used for the default value of the report paramenter but instead of holding 'DNK', which is the value of the username property in the identity element of the embed token, the default value of the parameter is set to the App ID (Guid of the app registration). 

 

This cannot be right. It should support limiting available parameter values based on a dataset. But this is not possible as the User!UserID is always equal to the App ID when parsed from the parameter pane.

 

@AlonBAR and @chrisfin is this due to the fact that we are in preview, can this be accomplished through a workaround or will this be fixed in a future release?

 

 

 

 

Status: New
Comments
pepyss
Regular Visitor

User!UserID returns the user principal name. 
So instead of domain\user1234 it returns user1234@example.com

That worked for me at least. 
Bonus: this expression removes everything after @ :

=Left(User!UserID, InStr(User!UserID, "@") - 1)