<?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: Error getting embed token with row level security in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/789879#M20726</link>
    <description>&lt;P&gt;Things that finally worked for us:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Had to give the service principal the permission "ReadOverrideEffectiveIdentity" by running Microsoft's rest api call with the datasourceId and the gatewayid.&lt;/P&gt;&lt;P&gt;see this link for more info:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security#on-premises-data-gateway-with-service-principal" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security#on-premises-data-gateway-with-service-principal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The identifier used in the JSON BODY Request is not the Azure AD service principal object Id, turns out that there is a separate identifier for the service principal when it is added to powerBi workspace as an admin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;running a rest call to get users on the workspace/report would give the actual identifier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*This is wierd as the documentation doesnot say that, but have raised this concern with microsoft.&lt;/P&gt;&lt;P&gt;2) After this, a normal call to get embed token along with effective identity works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2019 21:08:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-11T21:08:45Z</dc:date>
    <item>
      <title>Error getting embed token with row level security</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/785185#M20675</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having trouble getting App Only Embed token using C# and also via Postman.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I get the OAuth2 Access token for my service principal using App Id and Secret.&lt;/P&gt;&lt;P&gt;2) I try to post on&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{GroupId}/{ReportId}/GenerateToken" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{GroupId}/{ReportId}/GenerateToken&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;with the below body:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;{
"accessLevel": "View",
"identities": [
{
"username": "UserEmail@Company.com",
"roles": [ "SomeRole" ],
"datasets": ["DatasetId"]
}
]
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;{
"error": {
"code": "InvalidRequest",
"message": "Creating embed token for accessing dataset {DatasetId} requries gateway admin or datasource override effective identity access right"
}
}&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Sep 2019 03:17:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/785185#M20675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-06T03:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error getting embed token with row level security</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/785350#M20676</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you pls look this&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Unable-to-get-RLS-security-to-work-with-an-app-owns-data/td-p/446470" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Unable-to-get-RLS-security-to-work-with-an-app-owns-data/td-p/446470&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 06:26:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/785350#M20676</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-09-06T06:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error getting embed token with row level security</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/789879#M20726</link>
      <description>&lt;P&gt;Things that finally worked for us:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Had to give the service principal the permission "ReadOverrideEffectiveIdentity" by running Microsoft's rest api call with the datasourceId and the gatewayid.&lt;/P&gt;&lt;P&gt;see this link for more info:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security#on-premises-data-gateway-with-service-principal" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security#on-premises-data-gateway-with-service-principal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The identifier used in the JSON BODY Request is not the Azure AD service principal object Id, turns out that there is a separate identifier for the service principal when it is added to powerBi workspace as an admin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;running a rest call to get users on the workspace/report would give the actual identifier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*This is wierd as the documentation doesnot say that, but have raised this concern with microsoft.&lt;/P&gt;&lt;P&gt;2) After this, a normal call to get embed token along with effective identity works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 21:08:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/789879#M20726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-11T21:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error getting embed token with row level security</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/1552242#M26783</link>
      <description>&lt;P&gt;Incredible.&amp;nbsp; Almost a year after your post, I ran into the same issue.&amp;nbsp; Using the Microsoft sample app, the error was hidden from me.&amp;nbsp; I only saw 403 Forbidden returned.&amp;nbsp; Using Postman and APIs to generate an EmbedToken, I then saw the&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"Creating embed token for accessing dataset..."&lt;/PRE&gt;&lt;P&gt;mentioned above.&amp;nbsp; Your comment of "&lt;SPAN&gt;&lt;EM&gt;The identifier used in the JSON BODY Request is not the Azure AD service principal object Id, turns out that there is a separate identifier for the service principal when it is added to powerBi workspace as an admin.&lt;/EM&gt;" was finding a needle in a hay stack.&amp;nbsp; You were right!&amp;nbsp; Once I found the "identifier" of my service principal using &lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/groups/getgroupusers" target="_blank" rel="noopener"&gt;the APIs&lt;/A&gt; against the Power BI Workspace, I updated the username in my sample app and bam!&amp;nbsp; I finally executed a successful end to end request.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 13:27:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/1552242#M26783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-16T13:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error getting embed token with row level security</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/1820294#M29277</link>
      <description>&lt;P&gt;After doing what worked for you (find the service principal identifier using the rest api and give the &lt;SPAN&gt;ReadOverrideEffectiveIdentity permissions to it&lt;/SPAN&gt;), now we´re getting a different error: &lt;EM&gt;"Only folder user with reshare permissions can generate embed token"&lt;/EM&gt;.&amp;nbsp; Do you know what might be the cause of this?&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 16:56:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-getting-embed-token-with-row-level-security/m-p/1820294#M29277</guid>
      <dc:creator>lnoguera</dc:creator>
      <dc:date>2021-05-03T16:56:34Z</dc:date>
    </item>
  </channel>
</rss>

