<?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: Datasets - Execute Query endpoint with RLS in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4698555#M61272</link>
    <description>&lt;P&gt;Hi, sorry for a long time to answer.&amp;nbsp;&lt;BR /&gt;not work for me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still return all data.&lt;/P&gt;</description>
    <pubDate>Mon, 19 May 2025 13:01:01 GMT</pubDate>
    <dc:creator>marcio_fornari</dc:creator>
    <dc:date>2025-05-19T13:01:01Z</dc:date>
    <item>
      <title>Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4682119#M61030</link>
      <description>&lt;P&gt;This endpoint:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries" target="_blank"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Can i use the identities to set a role and username?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 14:36:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4682119#M61030</guid>
      <dc:creator>marcio_fornari</dc:creator>
      <dc:date>2025-05-06T14:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4682500#M61036</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/197418"&gt;@marcio_fornari&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the Microsoft fabric community forum regarding the use of the execute Queries endpoint with Row-Level Security (RLS) in Power BI.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Yes, you can use the identities field in the Execute Queries API to apply Row-Level Security (RLS). You can set both the username and roles in your API call to simulate the security context. Make sure the role you're passing matches one defined in the dataset, and that the username aligns with what your DAX security rules expect (USERPRINCIPALNAME() or USERNAME()).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;You’re following correct documentation, to implement RLS effectively using the identities field, please refer to the official Microsoft documentation, which provides comprehensive guidance on structuring your request: &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries" target="_blank"&gt;Execute Queries – Power BI REST API&lt;/A&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Defining RLS Roles: Ensure that RLS roles are properly configured in your Power BI dataset.&lt;/LI&gt;
&lt;LI&gt;Constructing the identities Array: Your request body should include the identities array with the appropriate username, roles, and datasets fields.&lt;/LI&gt;
&lt;LI&gt;Authentication: Use a valid Azure AD bearer token with the necessary permissions to access the dataset.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If this post&amp;nbsp;helps, then please give us ‘Kudos’ and consider&amp;nbsp;Accept it as a solution&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;&lt;BR /&gt;Thank you for using Microsoft Community Forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 04:24:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4682500#M61036</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-05-07T04:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4683398#M61053</link>
      <description>&lt;P&gt;Hello, this documentation is not clear about Rls identities. Can you send a body example?&lt;BR /&gt;I tested this and not filter the rls, return all rows.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "queries": [
    {
      "query": "EVALUATE VALUES(table)"
    }
  ],
 "identities": [
    {
      "username": "xxx@xxx.com",
      "roles": [
        "myrole"
      ],
      "datasets": [
        "xxx-xxx-xxx-xxxx"
      ]
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 14:55:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4683398#M61053</guid>
      <dc:creator>marcio_fornari</dc:creator>
      <dc:date>2025-05-07T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4684330#M61062</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/197418"&gt;@marcio_fornari&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank you for the follow-up and for sharing the request body you tested. You are correct in using the identities field in the Execute Queries endpoint to simulate RLS. However, RLS filtering only applies under specific conditions. Here are the steps to ensure it is configured correctly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Requirements for RLS to Work:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Premium or Fabric Capacity: The dataset must be in a workspace supported by Premium capacity (P SKU or Embedded A SKU) or Microsoft Fabric capacity.&lt;/LI&gt;
&lt;LI&gt;Defined RLS Roles: Ensure that the role name (such as "myrole" in your example) is precisely defined in the Power BI dataset under &lt;EM&gt;Manage roles&lt;/EM&gt; in Power BI Desktop or service.&lt;/LI&gt;
&lt;LI&gt;Matching Identity: The username must align with what your DAX RLS expressions evaluate using USERNAME() or USERPRINCIPALNAME(). For instance, if your DAX rule filters based on email, the username must be the user's email.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Example Request Body (Correct Format):&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{

  "queries": [

    {

      "query": "EVALUATE VALUES('YourTableName')"

    }

  ],

  "identities": [

    {

      "username": "user@yourdomain.com",

      "roles": [

        "SalesRegionRole"

      ],

      "datasets": [

        "your-dataset-guid"

      ]

    }

  ]

}
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Required Headers: Ensure you are using an Azure AD bearer token with permissions to read from the dataset. The request must include:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Authorization: Bearer &amp;lt;your-access-token&amp;gt;

Content-Type: application/json&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are still retrieving &lt;STRONG&gt;all rows&lt;/STRONG&gt;, it typically indicates one of the following issues: The RLS role name does not match exactly.&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;The dataset is not located in a Premium/Fabric workspace.&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;Your dataset does not utilize USERNAME() or USERPRINCIPALNAME() in the DAX security rule.&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;The token does not impersonate the user (though the identities field should simulate this if Premium capacity is enabled).&lt;BR /&gt;&lt;BR /&gt;If this post&amp;nbsp;helps, then please give us ‘Kudos’ and consider&amp;nbsp;Accept it as a solution&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;&lt;BR /&gt;Thank you for using Microsoft Community Forum.&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 09:12:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4684330#M61062</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-05-08T09:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4687813#M61117</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/197418"&gt;@marcio_fornari&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 May 2025 09:46:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4687813#M61117</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-05-11T09:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4692574#M61190</link>
      <description>&lt;P&gt;&lt;SPAN data-teams="true"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/197418"&gt;@marcio_fornari&lt;/a&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;&lt;BR /&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 12:59:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4692574#M61190</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-05-14T12:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4696617#M61237</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/197418"&gt;@marcio_fornari&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2025 03:57:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4696617#M61237</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-05-17T03:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4698555#M61272</link>
      <description>&lt;P&gt;Hi, sorry for a long time to answer.&amp;nbsp;&lt;BR /&gt;not work for me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still return all data.&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 13:01:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4698555#M61272</guid>
      <dc:creator>marcio_fornari</dc:creator>
      <dc:date>2025-05-19T13:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4701073#M61299</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/197418"&gt;@marcio_fornari&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Apologize for the delayed reply. Thank you for your patience and the update. I have identified few workarounds that may help resolve the issue.&lt;BR /&gt;&lt;BR /&gt;Premium/Fabric Capacity: Ensure the dataset is hosted in a workspace with Premium capacity (P or A SKU) or Microsoft Fabric capacity. Note that RLS simulation via the identities field is not supported in Pro-only workspaces.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;RLS Roles Are Properly Defined: Confirm that the role (e.g., "SalesRegionRole") is created in Power BI Desktop under Modelling &amp;gt; Manage Roles and published to the service.&lt;BR /&gt;&lt;BR /&gt;DAX Expressions Use USERNAME() or USERPRINCIPALNAME(): Your DAX filters within the role should utilize these functions to evaluate the username from the API call:&lt;/P&gt;
&lt;P&gt;[EmailColumn] = USERPRINCIPALNAME()&lt;BR /&gt;&lt;BR /&gt;Accurate Role Name and Username in API Payload: The roles field is case-sensitive and must match precisely. The username must correspond to what your RLS expression expects (typically an email).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Azure AD Token: Ensure your request includes a valid Azure AD bearer token with permission to access the dataset. Sample JSON Payload:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{

  "queries": [

    {

      "query": "EVALUATE VALUES('YourTableName')"

    }

  ],

  "identities": [

    {

      "username": "user@yourdomain.com",

      "roles": [

        "YourRoleName"

      ],

      "datasets": [

        "your-dataset-guid"

      ]

    }

  ]

}&lt;/LI-CODE&gt;
&lt;P&gt;Replace 'YourTableName' with the actual table name from your dataset&lt;/P&gt;
&lt;P&gt;'YourRoleName' with your defined role&lt;/P&gt;
&lt;P&gt;'your-dataset-guid' with the Dataset ID (GUID)&lt;/P&gt;
&lt;P&gt;'user@yourdomain.com' with the value your RLS rule evaluates against&lt;/P&gt;
&lt;P&gt;Ensure the role name matches exactly what’s defined in Power BI Desktop under &lt;EM&gt;Manage Roles&lt;/EM&gt;.&lt;BR /&gt;&lt;BR /&gt;Please refer these links for more information:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security" target="_blank"&gt;Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/enterprise/service-premium-what-is" target="_blank"&gt;What is Power BI Premium? - Power BI | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Kindly refer to the below solved link for better understanding:&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Rest-API-to-query-dataset-with-RLS/m-p/3501490" target="_blank"&gt;Solved: Rest API to query dataset with RLS - Microsoft Fabric Community&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;helps, then please give us ‘Kudos’ and consider&amp;nbsp;Accept it as a solution&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank you for using Microsoft Community Forum.&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 07:05:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4701073#M61299</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-05-21T07:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4703822#M61347</link>
      <description>&lt;P&gt;Hello, still not working. I think this endpoint (&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries&lt;/A&gt;&amp;nbsp;)&amp;nbsp;not work with RLS.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 14:46:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4703822#M61347</guid>
      <dc:creator>marcio_fornari</dc:creator>
      <dc:date>2025-05-22T14:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4704467#M61355</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/197418"&gt;@marcio_fornari&lt;/a&gt;.,&lt;/P&gt;
&lt;P&gt;Thank you for the update, and I appreciate your continued patience.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;You are correct. The Execute Queries REST API does not enforce RLS by default as it does when a user views the report in the Power BI Service. The identities field can simulate RLS only under certain conditions, such as:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The dataset is hosted in a Premium (P or A SKU) or Microsoft Fabric capacity workspace not in Pro-only workspaces.&lt;/LI&gt;
&lt;LI&gt;The username and roles fields in the payload must exactly match your RLS configuration expectations.&lt;/LI&gt;
&lt;LI&gt;The RLS role must correctly use USERPRINCIPALNAME() or USERNAME().&lt;/LI&gt;
&lt;LI&gt;A valid Azure AD token must be used with the appropriate dataset permissions.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If all these conditions are met and RLS is still not being applied, it is essential to understand that RLS simulation via API has limitations and may not behave exactly like the Power BI Service.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Verify Workspace Capacity: Ensure that the dataset is located in a Premium or Fabric capacity workspace.&lt;/LI&gt;
&lt;LI&gt;Test RLS Simulation: As an alternative, you can test RLS directly in the Power BI Service using "Test as Role" to verify the logic.&lt;/LI&gt;
&lt;LI&gt;Explore Other Options: If enforcing RLS via API is essential, consider using embedding scenarios with effective identity, designed for secure per-user data access in embedded analytics.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If this post&amp;nbsp;helps, then please give us ‘Kudos’ and consider&amp;nbsp;Accept it as a solution&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank you again for reaching out on the Microsoft Community Forum.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 05:15:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4704467#M61355</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-05-23T05:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4706506#M61395</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/197418"&gt;@marcio_fornari&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 03:56:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4706506#M61395</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-05-26T03:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Datasets - Execute Query endpoint with RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4729245#M61756</link>
      <description>&lt;P&gt;Hi, sorry for the long time to response.&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;None of those solutions worked for me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Into my embedded report, the RLS works fine, the problem is just about the execute queries.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My steps:&lt;BR /&gt;&lt;BR /&gt;1 - Generate a authentication token by service principal and master user (the both not work)&lt;BR /&gt;2 - Get the token from the step 1 and call the api generate token:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;POST:https://api.powerbi.com/v1.0/myorg/GenerateToken
{
  "datasets": [
    {
      "id": "xxx-xx-xxxx"
    }
  ],
  "targetWorkspaces": [
    {
      "id": "xxx-xxx-xxxx-xxx"
    }
  ],
  "identities": [
    {
      "username": "usernamexxx",  
      "roles": ["rolexxx"],     
      "datasets": ["xxxx-xxx-xxxx"]
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;3 - Get the token from step 2 and execute querie:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;POST: POST https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/executeQueries
BODY example:
{

  "queries": [

    {

      "query": "EVALUATE VALUES('mytable')"

    }

  ],&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 23:42:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Datasets-Execute-Query-endpoint-with-RLS/m-p/4729245#M61756</guid>
      <dc:creator>marcio_fornari</dc:creator>
      <dc:date>2025-06-11T23:42:53Z</dc:date>
    </item>
  </channel>
</rss>

