<?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 can I get workspace groups and their users via a table — and also from a Databricks App? in Data Governance</title>
    <link>https://community.databricks.com/t5/data-governance/how-can-i-get-workspace-groups-and-their-users-via-a-table-and/m-p/145219#M2748</link>
    <description>&lt;P&gt;I’m trying to &lt;STRONG&gt;get a full list of Databricks workspace groups and their user memberships&lt;/STRONG&gt;. I want to do this in two ways:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;As a &lt;STRONG&gt;queryable table or view&lt;/STRONG&gt; (e.g., for audits, security reviews, app integration)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;From within a &lt;STRONG&gt;Databricks App&lt;/STRONG&gt; (Streamlit-style), using Python (SDK or SQL)&lt;BR /&gt;&lt;BR /&gt;I see information about system.access.users table but can't see the table, if it's not enabled in the system is it possible to enable later or what other options do I have to get the group.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be more spesific as an admin when I create a group in workspace such as 'project-users' assign that group &lt;A href="mailto:user1@email.com" target="_blank" rel="noopener"&gt;user1@email.com &lt;/A&gt;and give read access to that group. I want to be able to get the information as a table instead of checking the databricks UI.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jan 2026 09:27:51 GMT</pubDate>
    <dc:creator>discuss_darende</dc:creator>
    <dc:date>2026-01-26T09:27:51Z</dc:date>
    <item>
      <title>How can I get workspace groups and their users via a table — and also from a Databricks App?</title>
      <link>https://community.databricks.com/t5/data-governance/how-can-i-get-workspace-groups-and-their-users-via-a-table-and/m-p/145219#M2748</link>
      <description>&lt;P&gt;I’m trying to &lt;STRONG&gt;get a full list of Databricks workspace groups and their user memberships&lt;/STRONG&gt;. I want to do this in two ways:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;As a &lt;STRONG&gt;queryable table or view&lt;/STRONG&gt; (e.g., for audits, security reviews, app integration)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;From within a &lt;STRONG&gt;Databricks App&lt;/STRONG&gt; (Streamlit-style), using Python (SDK or SQL)&lt;BR /&gt;&lt;BR /&gt;I see information about system.access.users table but can't see the table, if it's not enabled in the system is it possible to enable later or what other options do I have to get the group.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be more spesific as an admin when I create a group in workspace such as 'project-users' assign that group &lt;A href="mailto:user1@email.com" target="_blank" rel="noopener"&gt;user1@email.com &lt;/A&gt;and give read access to that group. I want to be able to get the information as a table instead of checking the databricks UI.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jan 2026 09:27:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/how-can-i-get-workspace-groups-and-their-users-via-a-table-and/m-p/145219#M2748</guid>
      <dc:creator>discuss_darende</dc:creator>
      <dc:date>2026-01-26T09:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get workspace groups and their users via a table — and also from a Databricks App?</title>
      <link>https://community.databricks.com/t5/data-governance/how-can-i-get-workspace-groups-and-their-users-via-a-table-and/m-p/145233#M2749</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/211981"&gt;@discuss_darende&lt;/a&gt;&amp;nbsp;- you could use below code in the notebook.&lt;/P&gt;&lt;P&gt;Pls adjust it based on your need.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from databricks.sdk import AccountClient, WorkspaceClient

# If env vars are set, this picks them up automatically
a = WorkspaceClient()

# List identities
users = list(a.users.list())
groups = list(a.groups.list())
service_principals = list(a.service_principals.list())

print(f"Users: {len(users)}")
for u in users[:10]:
    print(f"- {u.user_name}")

print(f"\nGroups: {len(groups)}")
for g in groups[:10]:
    print(f"- {g.display_name}")

print(f"\nService Principals: {len(service_principals)}")
for sp in service_principals[:10]:
    print(f"- {getattr(sp, 'display_name', getattr(sp, 'application_id', 'unknown'))}")


def get_group_members_by_id(group_id: str):
    w = WorkspaceClient()
    group = w.groups.get(id=group_id)  # SCIM read of the group
    members = group.members or []
    return members

# List users and service principals in each group
for group in a.groups.list():
    print(f"Group: {group.display_name}")
    members = list(get_group_members_by_id(group.id))
    for member in members:
        print(f"  - {member.type}: {getattr(member, 'display', getattr(member, 'user_name', 'unknown'))}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jan 2026 09:47:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/how-can-i-get-workspace-groups-and-their-users-via-a-table-and/m-p/145233#M2749</guid>
      <dc:creator>Raman_Unifeye</dc:creator>
      <dc:date>2026-01-26T09:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get workspace groups and their users via a table — and also from a Databricks App?</title>
      <link>https://community.databricks.com/t5/data-governance/how-can-i-get-workspace-groups-and-their-users-via-a-table-and/m-p/145239#M2750</link>
      <description>&lt;P&gt;Is there a way to make this work for a Databricks App? A service principal would likely get stuck during authentication when connecting. My main goal is to retrieve this information and present it in the app—do you think this is possible&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jan 2026 10:47:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/how-can-i-get-workspace-groups-and-their-users-via-a-table-and/m-p/145239#M2750</guid>
      <dc:creator>discuss_darende</dc:creator>
      <dc:date>2026-01-26T10:47:50Z</dc:date>
    </item>
  </channel>
</rss>

