Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello Community,
I have a problem with the resolution of the username function in the report server context.
I have a dataset (imported data from Excel, which is then published to the RS) in which I have built an RLS. For resolution, I usually use the username() function. If I check the function via PowerBI Desktop RS on the server instance of the RS, the username() can be resolved in the format Domain\Username. If I publish the report on the RS and check the functions within the report server, e.g. in a matrix in the report, then the function Username() resolves as a userprincipalname in the format Name@Domain.extension.
How can this happen?
Reports based on data from SSAS cubes are available on the same report server. Username functions are also resolved in the reports. However, these are again in the expected format Domain\Username. However, the SSAS instances are located on a different server in the network.
Can someone explain to me how this deviation can occur within the same RS instance? What exactly is the cause?
Hi, @Xriz
In Power BI Desktop RS, functions typically resolve to a format. username()DomainUsername, however, when the report is published to the report server, it may resolve to the User Principal Name (UPN) format Name@Domain.extension. You can check the following link:
Resolving of Username results in UPN - Microsoft Fabric Community
The resolution of a function can be affected by how RLS is configured. username() If RLS is set to use UPN, the function will return username() in UPN format. You can check the following link:
Using Username() in DAX with Row-Level Security | Microsoft Power BI Blog | Microsoft Power BI
SSAS cube-based reports may parse functions differently because SSAS may be configured to use that format. username()DomainUsernameThis may be due to a different authentication mechanism or configuration on the SSAS server. You can refer to the following link:
USERNAME() v/s USERPRINCIPALNAME() in RLS for Pow... - Microsoft Fabric Community
You may need to verify the authentication settings on the report server. Make sure it is configured to use the desired format for user identification. Or review the RLS settings in the dataset to make sure they align with the expected user identification format. Ensure that the configuration of user identity resolution is consistent across Power BI Desktop RS, Report Server, and SSAS.
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Yongkang for your answer. Unfortunately, the links do not explain in detail where the change needs to be made, or where exactly the problem is located:
Link1 - leads to this thread
Link2 - an interesting article by Adam, but he describes the effect of the RLS settings in the service (cloud). However, this is explicitly about the RS onpremise and I think that is a difference in this context.
Link3 - is about RLS in the context of PBI Embedded (Cloud) again, I think the functionality is fundamentally different (AoD or UoD). In the cloud, the username() is always resolved as a UPN in my opinion. The aforementioned embedded thread also only talks about the format Username@Domain.
The following statements were interesting:
@v-yohua-msft wrote:[...]
SSAS cube-based reports may parse functions differently because SSAS may be configured to use that format. username()DomainUsernameThis may be due to a different authentication mechanism or configuration on the SSAS server.
[...]
Can you tell me where exactly this configuration can be made, or even better: Where to make this configuration on the report server instance.
@v-yohua-msft wrote:[...]
You may need to verify the authentication settings on the report server.
[...]
You mean in report server config? We set it up with RSWinNegotiate or RSWinNTLM
@v-yohua-msft wrote:[...]
Make sure it is configured to use the desired format for user identification.
[...]
Where?
@v-yohua-msft wrote:[...]
Or review the RLS settings in the dataset to make sure they align with the expected user identification format.
[...]
RLS-Rolemodel is set up with Username. As described Username gets resolved as UPN, so RLS is not fitting any filter.
@v-yohua-msft wrote:[...]
Ensure that the configuration of user identity resolution is consistent across Power BI Desktop RS, Report Server, and SSAS.
It's obviously not consistent, but I have no idea where and how to check this.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
6 | |
4 | |
3 | |
3 | |
3 |