<?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 Alertsv2 Permissions in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132502#M49514</link>
    <description>&lt;P&gt;Hey team,&lt;/P&gt;&lt;P&gt;Is it possible to set permissions on Alertsv2 using API or share it? I did look at the API docs and cannot see as option to do so. In the UI, it's possible to 'share' an alert. The issue is that I currently have SP, which is used to create alerts in higher environments and only admins can see those alerts in UI.&lt;/P&gt;&lt;P&gt;I did try to trace what enpoint is called when sharing the alert and it seems to be only available in UI:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ajax-api/2.0/accesspolicies&lt;/LI-CODE&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Pat.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Sep 2025 20:55:07 GMT</pubDate>
    <dc:creator>Pat</dc:creator>
    <dc:date>2025-09-18T20:55:07Z</dc:date>
    <item>
      <title>Alertsv2 Permissions</title>
      <link>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132502#M49514</link>
      <description>&lt;P&gt;Hey team,&lt;/P&gt;&lt;P&gt;Is it possible to set permissions on Alertsv2 using API or share it? I did look at the API docs and cannot see as option to do so. In the UI, it's possible to 'share' an alert. The issue is that I currently have SP, which is used to create alerts in higher environments and only admins can see those alerts in UI.&lt;/P&gt;&lt;P&gt;I did try to trace what enpoint is called when sharing the alert and it seems to be only available in UI:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ajax-api/2.0/accesspolicies&lt;/LI-CODE&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Pat.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 20:55:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132502#M49514</guid>
      <dc:creator>Pat</dc:creator>
      <dc:date>2025-09-18T20:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Alertsv2 Permissions</title>
      <link>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132509#M49519</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/59366"&gt;@Pat&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;Analyzing the problem I came to the following conclusions, see if this helps you: there isn’t a public REST endpoint to set ACLs on Alerts v2. The Alerts API only supports CRUD operations (create, list, update, delete) but not permissions. A workaround is to manage permissions at the folder level and let the alert inherit them using the Workspace Permissions API (&lt;A href="https://docs.databricks.com/api/workspace/permissions" target="_blank"&gt;https://docs.databricks.com/api/workspace/permissions&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;The SQL Permissions API is currently read-only, so it can’t set ACLs on alerts. If your challenge is service principal visibility or execution, you can configure the alert to run as a specific user/SP via the Alerts v2 update (&lt;A href="https://api-reference.cloud.databricks.com" target="_blank" rel="noopener"&gt;https://api-reference.cloud.databricks.com&lt;/A&gt;&lt;BR /&gt;). The /ajax-api/2.0/accesspolicies endpoint is UI-internal and not officially supported.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2025 00:21:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132509#M49519</guid>
      <dc:creator>WiliamRosa</dc:creator>
      <dc:date>2025-09-19T00:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Alertsv2 Permissions</title>
      <link>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132510#M49520</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/59366"&gt;@Pat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you are doing well, and thank you for reaching out.&lt;/P&gt;
&lt;P&gt;As you mentioned, the endpoint for AlertsV2 does not provide an explicit action for sharing. This is handled via the "&lt;A href="https://docs.databricks.com/api/workspace/dbsqlpermissions/set" target="_self"&gt;ACL/Permissions&lt;/A&gt;" within Databricks SQL group via:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;/api/2.0/preview/sql/permissions/{objectType}/{objectId}
&lt;/LI-CODE&gt;
&lt;P&gt;Here is a sample code taken from the API documentation:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "access_control_list": [
    {
      "group_name": "admins",
      "permission_level": "CAN_EDIT",
      "user_name": "user@example.com"
    }
  ],
  "object_id": "query/2cca1687-60ff-4886-a445-0230578c864d",
  "object_type": "alert"
}&lt;/LI-CODE&gt;
&lt;P&gt;Also, please notice that the documentation suggest to use a new version for setting &lt;A href="https://docs.databricks.com/api/workspace/workspace/setpermissions" target="_self"&gt;workspace object permissions&lt;/A&gt;&amp;nbsp;, check it out!&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2025 00:23:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132510#M49520</guid>
      <dc:creator>mmayorga</dc:creator>
      <dc:date>2025-09-19T00:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Alertsv2 Permissions</title>
      <link>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132532#M49529</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/179612"&gt;@WiliamRosa&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/127987"&gt;@mmayorga&lt;/a&gt;&amp;nbsp;, thanks for your input.&lt;BR /&gt;I systematically tested all available Databricks APIs that could potentially manage AlertsV2 permissions:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;H3 id="%E2%9D%8C-1-dbsql-permissions-api"&gt;1. DBSQL Permissions API&lt;/H3&gt;&lt;P class=""&gt;&lt;STRONG&gt;Endpoint&lt;/STRONG&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;workspace_client.dbsql_permissions.set()&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; databricks.sdk.service.sql &lt;SPAN class=""&gt;import&lt;/SPAN&gt; ObjectTypePlural, AccessControl

workspace_client.dbsql_permissions.&lt;SPAN class=""&gt;set&lt;/SPAN&gt;(
    object_type=ObjectTypePlural.ALERTS,
    object_id=&lt;SPAN class=""&gt;str&lt;/SPAN&gt;(alert_id),
    access_control_list=[
        AccessControl(user_name=&lt;SPAN class=""&gt;"user@company.com"&lt;/SPAN&gt;, permission_level=&lt;SPAN class=""&gt;"CAN_MANAGE"&lt;/SPAN&gt;)
    ]
)&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;: Failed - AlertsV2 not supported by this API&lt;/P&gt;&lt;H3 id="%E2%9D%8C-2-sql-permissions-api"&gt;2. SQL Permissions API&lt;/H3&gt;&lt;P class=""&gt;&lt;STRONG&gt;Endpoint&lt;/STRONG&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;/api/2.0/preview/sql/permissions/alert/{alert_id}&lt;/P&gt;&lt;PRE&gt;POST /api/&lt;SPAN class=""&gt;2.0&lt;/SPAN&gt;/preview/sql/permissions/alert/&lt;SPAN class=""&gt;{&lt;/SPAN&gt;alert_id&lt;SPAN class=""&gt;}&lt;/SPAN&gt;
&lt;SPAN class=""&gt;{&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;"access_control_list"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;[&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;{&lt;/SPAN&gt;
      &lt;SPAN class=""&gt;"user_name"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"user@company.com"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
      &lt;SPAN class=""&gt;"permission_level"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"CAN_MANAGE"&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;}&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;]&lt;/SPAN&gt;
&lt;SPAN class=""&gt;}&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;: Failed - "Model not found for alert" error&lt;/P&gt;&lt;H3 id="%E2%9D%8C-3-access-policies-api-ui-internal"&gt;3. Access Policies API (UI Internal)&lt;/H3&gt;&lt;P class=""&gt;&lt;STRONG&gt;Endpoint&lt;/STRONG&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;/ajax-api/2.0/accesspolicies&lt;/P&gt;&lt;PRE&gt;PATCH /ajax-api/&lt;SPAN class=""&gt;2.0&lt;/SPAN&gt;/accesspolicies
&lt;SPAN class=""&gt;{&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;"access_policy"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;{&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;"name"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"alertsv2/{alert_id}"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;"internal_name"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"tree/{alert_id}"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;"permissions"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;[&lt;/SPAN&gt;
      &lt;SPAN class=""&gt;{&lt;/SPAN&gt;
        &lt;SPAN class=""&gt;"principal"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"principals/{user_id}"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
        &lt;SPAN class=""&gt;"permissions"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;"CAN_MANAGE"&lt;/SPAN&gt;&lt;SPAN class=""&gt;]&lt;/SPAN&gt;
      &lt;SPAN class=""&gt;}&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;]&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;"send_notification"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;false&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class=""&gt;}&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;: Failed - 403 Forbidden, requires CSRF token and browser session authentication&lt;/P&gt;&lt;H3 id="%E2%9D%8C-4-workspace-permissions-api"&gt;4. Workspace Permissions API&lt;/H3&gt;&lt;P class=""&gt;&lt;STRONG&gt;Endpoint&lt;/STRONG&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;workspace.set_permissions()&lt;/P&gt;&lt;PRE&gt;workspace_client.workspace.set_permissions(
    workspace_object_type=&lt;SPAN class=""&gt;"alerts"&lt;/SPAN&gt;,
    workspace_object_id=&lt;SPAN class=""&gt;str&lt;/SPAN&gt;(alert_id),
    access_control_list=[...]
)&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;: Failed - AlertsV2 not recognized as valid workspace objects&lt;/P&gt;&lt;H3&gt;Manual workaround:&lt;/H3&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Share alerts through Databricks UI:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Navigate to SQL → Alerts&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Find your alert&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Click Share button&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Add users/groups manually&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 Sep 2025 08:02:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132532#M49529</guid>
      <dc:creator>Pat</dc:creator>
      <dc:date>2025-09-19T08:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Alertsv2 Permissions</title>
      <link>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132546#M49538</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/59366"&gt;@Pat&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;According to github thread this will be possible within couple of weeks. There's a PR already that will make it possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can track progress here.&amp;nbsp;They are&lt;SPAN&gt;&amp;nbsp;working on fixing some platform-side issues but soon it should be available.&lt;/SPAN&gt;&amp;nbsp;&lt;BR /&gt;PR is related to DABs but all databricks cli/dabs are talking through rest api.&lt;BR /&gt;So I guess once they release it you will be able to use databricks sdk/dab/rest api to achieve your goal.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/databricks/cli/issues/1615" target="_blank" rel="noopener"&gt;Feature Request: Please add SQL Query and SQL Alert support to Asset Bundle · Issue #1615 · databricks/cli&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1758277361380.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20116i6658D4B0250CE964/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1758277361380.png" alt="szymon_dybczak_0-1758277361380.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2025 10:26:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132546#M49538</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-09-19T10:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Alertsv2 Permissions</title>
      <link>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132796#M49633</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;I have asked about it in the github thread.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to successfully manage AlertsV2 permissions using the Workspace Permissions API with the correct object type:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;workspace_client.workspace.set_permissions(
    workspace_object_type="alertsv2",  # Key difference: use "alertsv2" not "alerts"
    workspace_object_id=str(alert_id),
    access_control_list=[
        AccessControl(user_name="user@company.com", permission_level="CAN_MANAGE")
    ]
)&lt;/LI-CODE&gt;&lt;P&gt;The solution was using workspace_object_type="alertsv2" instead of "alerts". This works for the new AlertsV2 system.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 08:06:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132796#M49633</guid>
      <dc:creator>Pat</dc:creator>
      <dc:date>2025-09-23T08:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Alertsv2 Permissions</title>
      <link>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132797#M49634</link>
      <description>&lt;P&gt;No problem&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/59366"&gt;@Pat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 08:09:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alertsv2-permissions/m-p/132797#M49634</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-09-23T08:09:28Z</dc:date>
    </item>
  </channel>
</rss>

