<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Return full username in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2188630#M32897</link>
    <description>&lt;P&gt;please provide more details. What have you tried and where are you stuck?&lt;/P&gt;</description>
    <pubDate>Sun, 14 Nov 2021 01:13:06 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2021-11-14T01:13:06Z</dc:date>
    <item>
      <title>Return full username</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2186103#M32878</link>
      <description>&lt;P&gt;I have a table that has the username, name among other information, I want to get the username from the pbi and cross it with this table and return the other information of this user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to cross Username with Login_AD and return First_Name_AD&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 22:31:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2186103#M32878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-11T22:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Return full username</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2188630#M32897</link>
      <description>&lt;P&gt;please provide more details. What have you tried and where are you stuck?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Nov 2021 01:13:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2188630#M32897</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-11-14T01:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Return full username</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2193852#M32955</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can use Row-Level-Security to &lt;SPAN&gt;restrict data access for given users.&amp;nbsp;Your end user could only see values belong to them after you set RLS in Power BI. What does [Username] looks like, only name or email format? We will use &lt;A href="https://docs.microsoft.com/en-us/dax/username-function-dax" target="_self"&gt;UserName()&lt;/A&gt; or &lt;A href="https://docs.microsoft.com/en-us/dax/userprincipalname-function-dax" target="_self"&gt;UserPrincipalName()&lt;/A&gt; Function to get Login_AD.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;UserName() will return Domain\Name in Power BI Desktop.&amp;nbsp;UserPrincipalName() will return email format like &lt;A href="mailto:UserA@xxx.com" target="_blank"&gt;UserA@xxx.com&lt;/A&gt;. Both of them will return&amp;nbsp;email format in Power BI Service. So here I suggest you to use&amp;nbsp;UserPrincipalName(). And you need a Email format column in your table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My Sample:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 332px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/632521i9F622A32C394D682/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Manage role in Desktop:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 935px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/632522iEBACD27A17FBD45F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Test Result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 519px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/632523iD1B8BEA12CDA3CFB/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You need to add the user in Role in Security in Dataset after you publish this report to Power BI Service.&lt;/P&gt;
&lt;P&gt;For reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls#manage-security-on-your-model" target="_self"&gt;Manage security on your model&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp;&lt;SPAN&gt;Workspace members assigned&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Admin&lt;/STRONG&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Member&lt;/STRONG&gt;&lt;SPAN&gt;, or&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Contributor&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;have edit permission for the dataset and, therefore, RLS doesn’t apply to them.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is a blog about dynamic RLS in power bi. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple" target="_self"&gt;Dynamic Row Level Security with Power BI Made Simple Posted on July 4, 2016&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 07:56:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2193852#M32955</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-17T07:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Return full username</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2194841#M32963</link>
      <description>&lt;P&gt;Get the usurname from the powerbi session and look it up in the table user and return the name.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Example.PNG" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/632791iCC3E34B4BAA70BFA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Example.PNG" alt="Example.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 16:01:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2194841#M32963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-17T16:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Return full username</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2195077#M32965</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;I understand your example, but I believe I have not been clear on my problem, what I need is to take the username function that returns the pbi user in domain\user format and look for that user in another table and return the full name.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 18:14:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2195077#M32965</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-17T18:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Return full username</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2195105#M32966</link>
      <description>&lt;P&gt;as&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;was pointing out you won't get that in the Power BI service. The service "only" gives you the email address. You need to base your lookups on that.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 18:35:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2195105#M32966</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-11-17T18:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Return full username</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2195591#M32978</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I mentioned before, &lt;SPAN&gt;UserName() will return Domain\Name in Power BI Desktop.&amp;nbsp;UserPrincipalName() will return email format like&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:UserA@xxx.com" target="_blank" rel="nofollow noopener noreferrer"&gt;UserA@xxx.com&lt;/A&gt; in Power BI Desktop&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Both of UserName() and&amp;nbsp;UserPrincipalName() will return&amp;nbsp;email format to show UPN(Current user login in Power BI Service) in Power BI Service.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My Test:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CurrentName = CALCULATE(MAX('Table'[Name]),FILTER('Table','Table'[Domain\Name] = [CurrentUser]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;In Desktop, UserName() will&amp;nbsp;return Domain\Name, so measure works well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 824px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/632974i21D06C0B337E9A12/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;In Service,&amp;nbsp;&lt;SPAN&gt;UserName() will&amp;nbsp;return a email format and measure won't work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/632975iEC5B11ED7960927D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 02:08:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2195591#M32978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-18T02:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Return full username</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2196485#M32988</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;Excellent, this solution worked perfectly.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 11:50:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Return-full-username/m-p/2196485#M32988</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-18T11:50:56Z</dc:date>
    </item>
  </channel>
</rss>

