<?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 How to Query All the users who have access to a databricks workspace? in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/how-to-query-all-the-users-who-have-access-to-a-databricks/m-p/113055#M3151</link>
    <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;I'm new to Databricks and we currently have a lot of users among different groups having access to a databricks workspace. I would like to know how I could query the users, groups and Entitlements of each groups using SQL or the API. Incase of API, I could use some help to point me towards how to use the API.&lt;/P&gt;&lt;P&gt;Thanks in advance!!!&lt;/P&gt;</description>
    <pubDate>Wed, 19 Mar 2025 14:46:57 GMT</pubDate>
    <dc:creator>pranav_</dc:creator>
    <dc:date>2025-03-19T14:46:57Z</dc:date>
    <item>
      <title>How to Query All the users who have access to a databricks workspace?</title>
      <link>https://community.databricks.com/t5/administration-architecture/how-to-query-all-the-users-who-have-access-to-a-databricks/m-p/113055#M3151</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;I'm new to Databricks and we currently have a lot of users among different groups having access to a databricks workspace. I would like to know how I could query the users, groups and Entitlements of each groups using SQL or the API. Incase of API, I could use some help to point me towards how to use the API.&lt;/P&gt;&lt;P&gt;Thanks in advance!!!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 14:46:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/how-to-query-all-the-users-who-have-access-to-a-databricks/m-p/113055#M3151</guid>
      <dc:creator>pranav_</dc:creator>
      <dc:date>2025-03-19T14:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Query All the users who have access to a databricks workspace?</title>
      <link>https://community.databricks.com/t5/administration-architecture/how-to-query-all-the-users-who-have-access-to-a-databricks/m-p/113062#M3153</link>
      <description>&lt;P class=""&gt;To query all users who have access to a Databricks workspace, you can follow these steps:&lt;/P&gt;&lt;H2&gt;1.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Check Workspace Users via Admin Console&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;If you are a workspace admin, navigate to the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Admin Console&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the Databricks UI. Under the "Users" tab, you can view all users who have been added to the workspace and their roles (e.g., workspace admin, user, or service principal).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;2.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Query Unity Catalog for Access Information&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;If your workspace is enabled for Unity Catalog, you can use SQL queries to check access privileges for users. For example:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;sql&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class=""&gt;*&lt;/SPAN&gt; &lt;SPAN class=""&gt;FROM&lt;/SPAN&gt; information_schema&lt;SPAN class=""&gt;.&lt;/SPAN&gt;role_authorizations &lt;SPAN class=""&gt;WHERE&lt;/SPAN&gt; principal_type &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;'USER'&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class=""&gt;This query retrieves all users and their associated roles in Unity Catalog&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;3.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;List Users via SCIM API&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;Use the Databricks SCIM API to programmatically retrieve a list of users in the workspace. For example:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;bash&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;curl -X GET \ -H "Authorization: Bearer &amp;lt;your-access-token&amp;gt;" \ https://&amp;lt;databricks-instance&amp;gt;/api/2.0/preview/scim/v2/Users&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class=""&gt;This will return a JSON object containing user details, including their roles and group memberships&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;4.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Check Default Privileges in Unity Catalog&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;By default, all workspace users receive certain privileges (e.g.,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;USE CATALOG) on the default schema of the Unity Catalog metastore. You can query these privileges using:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;sql&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;SHOW&lt;/SPAN&gt; GRANTS &lt;SPAN class=""&gt;ON&lt;/SPAN&gt; CATALOG &lt;SPAN class=""&gt;default&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class=""&gt;This will display all users and groups with access to the default catalog&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;5.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Audit Logs for User Activity&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;If you need to verify which users have accessed specific data or performed actions in the workspace, enable and review audit logs. These logs can provide detailed insights into user activities across the workspace&lt;A class="" href="https://docs.databricks.com/aws/en/data-governance/unity-catalog/enable-workspaces" target="_blank" rel="nofollow noopener"&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;3&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN class=""&gt;&lt;A class="" href="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/get-started" target="_blank" rel="nofollow noopener"&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;7&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;By combining these methods, you can comprehensively identify all users who have access to your Databricks workspace and their respective roles or privileges.&lt;/P&gt;&lt;P class=""&gt;Here are some additional resources/documentation that might be helpful:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/admin/users-groups/users" target="_blank" rel="noopener"&gt;https://docs.databricks.com/aws/en/admin/users-groups/users&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/privileges" target="_blank" rel="noopener"&gt;https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/privileges&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.databricks.com/api/workspace/users/list" target="_blank" rel="noopener"&gt;https://docs.databricks.com/api/workspace/users/list&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 19 Mar 2025 16:02:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/how-to-query-all-the-users-who-have-access-to-a-databricks/m-p/113062#M3153</guid>
      <dc:creator>tejaskelkar</dc:creator>
      <dc:date>2025-03-19T16:02:18Z</dc:date>
    </item>
  </channel>
</rss>

