简体   繁体   English

如何为Azure Analysis Services和PowerBI Embedded配置UPN映射/ CustomData

[英]How to configure UPN mapping/CustomData for Azure Analysis Services and PowerBI Embedded

Similar to this question . 类似于这个问题

I have a .Net Core Web App that embeds a PowerBI report, this report needs has Row Level Security applied at the data level in Azure Analysis Services using an on-premises data gateway. 我有一个嵌入PowerBI报告的.Net Core Web App,此报告需要使用本地数据网关在Azure Analysis Services的数据级别上应用行级安全性。

I have configured the EffectiveIdentity to pass through the UPN using the CustomData option, I have also setup a role and DAX query on the role to filter the rows. 我已使用CustomData选项配置了EffectiveIdentity以通过UPN,还设置了一个角色,并在该角色上设置了DAX查询以过滤行。

I have also setup the SQL Server Profiler as per this post and can confirm that the values being set inside CustomData are being passed through to Analysis services. 我还按照这篇文章设置了SQL Server Profiler,可以确认在CustomData中设置的值是否正在传递给Analysis Services。

In the non-Azure version of Analysis Services, you can configure the data gateway inside the PowerBI web portal to [map usernames]( https://docs.microsoft.com/en-us/power-bi/service-gateway-enterprise-manage-ssas#map-user-names . Since someone else setup the gateway (in Azure), and Azure Analysis Services is not a supported Data Source Type ( not an option in the dropdown ). I need to know if it is possible to view/change the Effective User names/CustomData setting . 在Analysis Services的非Azure版本中,您可以将PowerBI Web门户中的数据网关配置为[映射用户名]( https://docs.microsoft.com/zh-cn/power-bi/service-gateway-enterprise -manage-ssas#map-user-names 。由于其他人设置了网关(在Azure中),并且Azure Analysis Services不是受支持的数据源类型( 下拉菜单中不是选项 ),我需要知道是否有可能查看/更改有效用户名/ CustomData设置

So I finally figured this out, as far as I can tell UPN mapping is enabled by default. 因此,我终于弄清楚了,据我所知,UPN映射默认是启用的。

In my specific case I ended up using the CustomData option as per the docs . 在我的特定情况下,我最终根据docs使用了CustomData选项。 Initially this wasn't behaving as expected because on my Azure Analysis Services Database I had two row filters, one on the main data table that was comparing the user's email against the USERPRINCIPAL() DAX function, then the filter that I added against the user table comparing the user's email against CUSTOMDATA() DAX function. 最初,这并没有达到预期的效果,因为在我的Azure Analysis Services数据库上,我有两个行过滤器,一个在主数据表上,该USERPRINCIPAL()用户的电子邮件与USERPRINCIPAL() DAX函数进行比较,然后是我针对该用户添加的过滤器该表将用户的电子邮件与CUSTOMDATA() DAX函数进行比较。

To get this to work I ended up removing my own filter against the user table and replacing the use of the USERPRINCIPAL() function in the initial filter with CUSTOMDATA() - I verified this change with our BI guy and he was happy with it. 为了USERPRINCIPAL()起作用,我最终针对用户表删除了自己的过滤器,并使用USERPRINCIPAL()替换了初始过滤器中USERPRINCIPAL()函数的使用-我与我们的BI CUSTOMDATA()验证了这一更改,他对此感到满意。

I hope this saves someone else the trouble I had. 我希望这可以避免别人遇到的麻烦。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM