<?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: How to get model (not Dataset) ID - Part of getting RLS Roles and Role Members via Power BI REST in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/3066876#M41081</link>
    <description>&lt;P&gt;Hi, do you know how to programmatically authorize to get Bearer token and to have access to&amp;nbsp;&lt;SPAN&gt;analysis.windows.net/metadata/gallery/SharedDatasets?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2023 18:23:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-02-07T18:23:04Z</dc:date>
    <item>
      <title>How to get model (not Dataset) ID - Part of getting RLS Roles and Role Members via Power BI REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2085327#M31886</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was searching for a way to retrieve the RLS Roles and Role Members for Datasets using the Power BI REST API for Datasets located in the cloud service. The documentation doesn't have any option for this currently, and I've tried multiple different calls hoping it was buried in there via $expand but no luck (GetDatasetUsersAsAdmin,&amp;nbsp;GetGroupUsersAsAdmin, most other calls to anything with "Dataset", "Group", or "User" in it's name, etc.) and the closest I found was this post, which is unusable as it's for the report server not cloud service:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Report-Server/Can-I-update-Row-level-security-via-Rest-API/m-p/1146760" target="_blank"&gt;https://community.powerbi.com/t5/Report-Server/Can-I-update-Row-level-security-via-Rest-API/m-p/1146760&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some more digging and I found that calling a GET on one of the analysis.windows.net endpoints retrieved everything I needed, however it is in the form:&amp;nbsp;analysis.windows.net/metadata/model/{modelId}/rlsmembership. The {modelId} is not the GUID for the Dataset ID, but rather appears to be an Integer. My test case has 7 digits. However, I have no idea how to get this programatically after searching for quite a while.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can view the IDs from the Power BI service by going to the "Security" page for any RLS enabled Dataset, it will be in the URL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are: Is there a way to retrieve this ID using an API and if so, which one and how? Or, is there a way using the standard REST API to get the RLS Roles and Role Members for a Dataset?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 06:36:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2085327#M31886</guid>
      <dc:creator>JZT</dc:creator>
      <dc:date>2021-09-20T06:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get model (not Dataset) ID - Part of getting RLS Roles and Role Members via Power BI REST</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2090041#M31946</link>
      <description>&lt;P&gt;Why not pull this via DMV queries from the XMLA endpoint?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;select&lt;/SPAN&gt; * &lt;SPAN&gt;from&lt;/SPAN&gt; &lt;SPAN&gt;$SYSTEM&lt;/SPAN&gt;.TMSCHEMA_ROLES&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 02:06:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2090041#M31946</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-09-22T02:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get model (not Dataset) ID - Part of getting RLS Roles and Role Members via Power BI REST</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2096105#M32012</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/323127"&gt;@JZT&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;AFAIK, power bi REST API hasn't provided these types of features. In fact, power bi service already includes the feature to view and checking the dataset related RLS settings which not include in REST API.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;For this scenario, you may need to manually trace power bi service operation and collect corresponding information(e.g. token, key, values, and request configurations...) to use programing language to manually invoke them.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 06:29:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2096105#M32012</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-24T06:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get model (not Dataset) ID - Part of getting RLS Roles and Role Members via Power BI REST</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2102083#M32099</link>
      <description>&lt;P&gt;Thanks for your reply. I have tried querying DMVs, and yes that is one way to accomplish the goal. However:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I understand from the documentation that the account requires admin rights to query system DMVs which I very much want to avoid. The Web API can be scoped to read-only permissions.&lt;/LI&gt;&lt;LI&gt;I require 2 seperate calls (roles and members) since no joins are allowed where the Web API returns everything I need in a single call.&lt;/LI&gt;&lt;LI&gt;The Web API is orders of magnitude quicker from my testing with the rest of my solution currently being in PowerShell.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hopefully the Power BI REST API will be updated, I may create an Idea, but for now DMVs are not an ideal solution.&lt;/P&gt;&lt;P&gt;If this ends up being the only way forward, I will gladly mark your reply as the solution.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 06:41:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2102083#M32099</guid>
      <dc:creator>JZT</dc:creator>
      <dc:date>2021-09-28T06:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get model (not Dataset) ID - Part of getting RLS Roles and Role Members via Power BI REST</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2102087#M32100</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Correct, Power BI REST API does not have this feature. There are many features I would love the API to one day have &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Yes, tracing current operations is how I found the endpoint in my post. Unfortunately I have not been able to trace any calls to return the code I'm looking for.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 06:43:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2102087#M32100</guid>
      <dc:creator>JZT</dc:creator>
      <dc:date>2021-09-28T06:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get model (not Dataset) ID - Part of getting RLS Roles and Role Members via Power BI REST</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2985963#M40447</link>
      <description>&lt;P&gt;Very late reply, but maybe useful for someone else finding this old thread... I had the same problem and was trying to find a why to get hold of the model ID via REST APIs. They way I did it was by using another unofficial API,&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;analysis.windows.net/metadata/gallery/SharedDatasets. A GET request to that and find the dataset in teh result by searching for it´s ID and Workspace name. In that object the modelId can be found and then used to call the /rlsmembership endpoint.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Dec 2022 08:33:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/2985963#M40447</guid>
      <dc:creator>Ehjalmar</dc:creator>
      <dc:date>2022-12-23T08:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get model (not Dataset) ID - Part of getting RLS Roles and Role Members via Power BI REST</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/3066876#M41081</link>
      <description>&lt;P&gt;Hi, do you know how to programmatically authorize to get Bearer token and to have access to&amp;nbsp;&lt;SPAN&gt;analysis.windows.net/metadata/gallery/SharedDatasets?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 18:23:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/3066876#M41081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-07T18:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get model (not Dataset) ID - Part of getting RLS Roles and Role Members via Power BI REST</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/3067040#M41082</link>
      <description>&lt;P&gt;No, unfortunately not. I was using tokens manually copied from the browser while testing these endpoints then I got stuck when I realized I couldn´t generate a valid token programmatically.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 20:03:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-model-not-Dataset-ID-Part-of-getting-RLS-Roles-and/m-p/3067040#M41082</guid>
      <dc:creator>Ehjalmar</dc:creator>
      <dc:date>2023-02-07T20:03:14Z</dc:date>
    </item>
  </channel>
</rss>

