<?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: Using user-assigned managed identity inside notebook in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/112206#M44136</link>
    <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just wondering if anyone has any suggestions. We are still unable to use User Assigned managed identity inside the a notebook in Databricks to connect to a external Gen 2 storage&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2025 00:50:29 GMT</pubDate>
    <dc:creator>shervinmir</dc:creator>
    <dc:date>2025-03-11T00:50:29Z</dc:date>
    <item>
      <title>Using user-assigned managed identity inside notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/110439#M43576</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;I am interested in using a user-assigned managed identity within my notebook. I've come across examples using system-assigned managed identities or leveraging the Access Connector for Azure Databricks via Unity Catalog. However, as I do not have access to my Azure subscription as a Global Administrator, Unity Catalog isn't an option for me.&lt;/P&gt;&lt;P&gt;I've noticed that it's possible to run the notebook as the current user or add a service principal to the workspace. I've already added the user-assigned managed identity to my workspace. However, when attempting to run the notebook using this imported managed identity, I encounter authentication errors. My goal is to connect to a Gen 2 Storage account.&lt;/P&gt;&lt;P&gt;I've seen similar issues discussed in the community, but I haven't found any recent solutions. I'm reaching out to inquire if there's a way to achieve my objective.&lt;/P&gt;&lt;P&gt;Any assistance you can provide would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks for your time,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Shervin&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 04:17:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/110439#M43576</guid>
      <dc:creator>shervinmir</dc:creator>
      <dc:date>2025-02-18T04:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using user-assigned managed identity inside notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/110455#M43579</link>
      <description>&lt;P&gt;Thanks for your reply. The user-managed identity is not the issue because I use it on ADF to pull data from the same storage account. I have followed the documentation for adding the managed identity to workspace. Perhaps my issue is the syntax code used inside the notebook. Maybe I need to get a token using a library? Any example or documentation would help.&lt;/P&gt;&lt;P&gt;I have tried&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;df = spark.read.format(&lt;/SPAN&gt;&lt;SPAN&gt;"delta"&lt;/SPAN&gt;&lt;SPAN&gt;).option(&lt;/SPAN&gt;&lt;SPAN&gt;"header"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"true"&lt;/SPAN&gt;&lt;SPAN&gt;).load(&lt;/SPAN&gt;&lt;SPAN&gt;"abfss://{base folder}@{storage account name}.dfs.core.windows.net/{path to file}"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;df.show()&lt;BR /&gt;&lt;BR /&gt;i have also tried to use storage SDK and also tried to mount the storage but no success&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; azure.storage.filedatalake &lt;SPAN class=""&gt;import&lt;/SPAN&gt; DataLakeServiceClient &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; azure.identity &lt;SPAN class=""&gt;import&lt;/SPAN&gt; ManagedIdentityCredential credential = ManagedIdentityCredential() &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;service_client = DataLakeServiceClient( account_url=&lt;SPAN class=""&gt;f"https://{storage_account_name}.dfs.core.windows.net"&lt;/SPAN&gt;, credential=credential ) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;# List filesystems (containers)&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;for&lt;/SPAN&gt; filesystem &lt;SPAN class=""&gt;in&lt;/SPAN&gt; service_client.list_file_systems(): &lt;SPAN class=""&gt;print&lt;/SPAN&gt;(filesystem.name)&lt;BR /&gt;&lt;BR /&gt;Can you point me to the correct documentation? I think my issues is what is inside the notebook.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks again&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 18 Feb 2025 08:27:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/110455#M43579</guid>
      <dc:creator>shervinmir</dc:creator>
      <dc:date>2025-02-18T08:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using user-assigned managed identity inside notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/112206#M44136</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just wondering if anyone has any suggestions. We are still unable to use User Assigned managed identity inside the a notebook in Databricks to connect to a external Gen 2 storage&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 00:50:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/112206#M44136</guid>
      <dc:creator>shervinmir</dc:creator>
      <dc:date>2025-03-11T00:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using user-assigned managed identity inside notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/112602#M44272</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;SPAN&gt;I have followed the documentation for adding the managed identity to workspace.&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;you didn't link the guides you followed.&amp;nbsp; &amp;nbsp;but if it was&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/azure-mi" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/azure-mi&lt;/A&gt;&amp;nbsp;or&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/azure-mi-auth" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/dev-tools/azure-mi-auth&lt;/A&gt;&amp;nbsp;those are all about granting a UMI the ability to access a workspace...not about letting a workspace access other azure resources so they won't help AFAIK&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 16:30:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/112602#M44272</guid>
      <dc:creator>damour-jrs</dc:creator>
      <dc:date>2025-03-14T16:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using user-assigned managed identity inside notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/112626#M44273</link>
      <description>&lt;P&gt;i also came across&amp;nbsp;&lt;A href="https://community.databricks.com/t5/data-engineering/how-to-assign-user-managed-identity-to-dbr-cluster-so-i-can-use/td-p/83909" target="_blank"&gt;https://community.databricks.com/t5/data-engineering/how-to-assign-user-managed-identity-to-dbr-cluster-so-i-can-use/td-p/83909&lt;/A&gt;&amp;nbsp;which says...u have to use unity catalog's storage credential abstraction to make use of a umi...that makes a lot of sense as it abstracts datarbicks from the specific provider..eg UMI means nothing in AWS.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 17:02:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-user-assigned-managed-identity-inside-notebook/m-p/112626#M44273</guid>
      <dc:creator>damour-jrs</dc:creator>
      <dc:date>2025-03-14T17:02:11Z</dc:date>
    </item>
  </channel>
</rss>

