<?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: Retrieve Roles API for generating token in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Retrieve-Roles-API-for-generating-token/m-p/277543#M8316</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/44159"&gt;@jamesyoung&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;When generating a token you now can pass in the Role(s) to use for RLS. &lt;STRONG&gt;How can you retrieve the Roles programmatically? Is that possible?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Here is how you generate a token using a role:&lt;/P&gt;
&lt;P&gt;var generateTokenRequestParameters = new GenerateTokenRequest("View", null, identities: new List&amp;lt;EffectiveIdentity&amp;gt;&lt;BR /&gt;{ new EffectiveIdentity(username: "username", roles: new List&amp;lt;string&amp;gt; { "roleA", "roleB" }, datasets: new List&amp;lt;string&amp;gt; { "datasetId" }) });&lt;BR /&gt;var tokenResponse = await client.Reports.GenerateTokenInGroupAsync("groupId", "reportId", generateTokenRequestParameters);&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedded-rls/" target="_blank"&gt;https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedded-rls/&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/44159"&gt;@jamesyoung&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;AFAIK, it is not possible, there's no correlated REST API that can get RLS roles. You can check this idea&amp;nbsp;&lt;A href="https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13616925-rest-api-for-managing-roles-of-datasets" target="_self"&gt;REST API for managing roles of datasets&lt;/A&gt; and vote it up.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2017 06:36:06 GMT</pubDate>
    <dc:creator>Eric_Zhang</dc:creator>
    <dc:date>2017-10-13T06:36:06Z</dc:date>
    <item>
      <title>Retrieve Roles API for generating token</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Retrieve-Roles-API-for-generating-token/m-p/276339#M8287</link>
      <description>&lt;P&gt;When generating a token you now can pass in the Role(s) to use for RLS. How can you retrieve the Roles programmatically? Is that possible?&lt;BR /&gt;&lt;BR /&gt;Here is how you generate a token using a role:&lt;/P&gt;&lt;P&gt;var generateTokenRequestParameters = new GenerateTokenRequest("View", null, identities: new List&amp;lt;EffectiveIdentity&amp;gt;&lt;BR /&gt;{ new EffectiveIdentity(username: "username", roles: new List&amp;lt;string&amp;gt; { "roleA", "roleB" }, datasets: new List&amp;lt;string&amp;gt; { "datasetId" }) });&lt;BR /&gt;var tokenResponse = await client.Reports.GenerateTokenInGroupAsync("groupId", "reportId", generateTokenRequestParameters);&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedded-rls/" target="_blank"&gt;https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedded-rls/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 18:34:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Retrieve-Roles-API-for-generating-token/m-p/276339#M8287</guid>
      <dc:creator>jamesyoung</dc:creator>
      <dc:date>2017-10-11T18:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Roles API for generating token</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Retrieve-Roles-API-for-generating-token/m-p/277543#M8316</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/44159"&gt;@jamesyoung&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;When generating a token you now can pass in the Role(s) to use for RLS. &lt;STRONG&gt;How can you retrieve the Roles programmatically? Is that possible?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Here is how you generate a token using a role:&lt;/P&gt;
&lt;P&gt;var generateTokenRequestParameters = new GenerateTokenRequest("View", null, identities: new List&amp;lt;EffectiveIdentity&amp;gt;&lt;BR /&gt;{ new EffectiveIdentity(username: "username", roles: new List&amp;lt;string&amp;gt; { "roleA", "roleB" }, datasets: new List&amp;lt;string&amp;gt; { "datasetId" }) });&lt;BR /&gt;var tokenResponse = await client.Reports.GenerateTokenInGroupAsync("groupId", "reportId", generateTokenRequestParameters);&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedded-rls/" target="_blank"&gt;https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedded-rls/&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/44159"&gt;@jamesyoung&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;AFAIK, it is not possible, there's no correlated REST API that can get RLS roles. You can check this idea&amp;nbsp;&lt;A href="https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13616925-rest-api-for-managing-roles-of-datasets" target="_self"&gt;REST API for managing roles of datasets&lt;/A&gt; and vote it up.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 06:36:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Retrieve-Roles-API-for-generating-token/m-p/277543#M8316</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-10-13T06:36:06Z</dc:date>
    </item>
  </channel>
</rss>

