<?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: Debugging in VSCode: Failed to get refresh token in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4593584#M7673</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/913195"&gt;@nilendraFabric&lt;/a&gt;,&lt;BR /&gt;Thanks for your response!&lt;BR /&gt;I'm using the dev container provided by microsoft, this to ensure I don't have these issues.&lt;BR /&gt;But I've checked these pointers and they are configured correctly:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Broeks_0-1741032963765.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1246094i8001DCB71034D90D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Broeks_0-1741032963765.png" alt="Broeks_0-1741032963765.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Mar 2025 20:16:36 GMT</pubDate>
    <dc:creator>Broeks</dc:creator>
    <dc:date>2025-03-03T20:16:36Z</dc:date>
    <item>
      <title>Debugging in VSCode: Failed to get refresh token</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4593356#M7669</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm developing my spark job definition in VSCode. I'm using the &lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/set-up-vs-code-extension-with-docker-image" target="_self"&gt;devcontainer&lt;/A&gt; provided by microsoft.&lt;/P&gt;&lt;P&gt;I've added the provided config code to my main.py file, however I'm getting a "Failed to get refresh token" when i debug my code.&lt;/P&gt;&lt;P&gt;I'm using the conda runtime 1.2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tested my code and it works when running it in fabric as a SJD.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Broeks_0-1740930404258.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1245700i258552B4528B8B3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Broeks_0-1740930404258.png" alt="Broeks_0-1740930404258.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So I'm wondering what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added a part of my debuglog to this post:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Broeks_0-1741020093371.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1246044i7D1A9F2C7BEF750F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Broeks_0-1741020093371.png" alt="Broeks_0-1741020093371.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 16:48:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4593356#M7669</guid>
      <dc:creator>Broeks</dc:creator>
      <dc:date>2025-03-03T16:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging in VSCode: Failed to get refresh token</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4593568#M7672</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/781658"&gt;@Broeks&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here are some pointers to start debugging&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Ensure OpenJDK 8 is installed and configured (newer versions like JDK 21 cause compatibility issues)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Verify `JAVA_HOME` environment variable points to the JDK 8 installation path.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Confirm the `fabric-synapse-runtime-1.2` conda environment is properly activated in VS Code.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 20:04:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4593568#M7672</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-03-03T20:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging in VSCode: Failed to get refresh token</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4593584#M7673</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/913195"&gt;@nilendraFabric&lt;/a&gt;,&lt;BR /&gt;Thanks for your response!&lt;BR /&gt;I'm using the dev container provided by microsoft, this to ensure I don't have these issues.&lt;BR /&gt;But I've checked these pointers and they are configured correctly:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Broeks_0-1741032963765.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1246094i8001DCB71034D90D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Broeks_0-1741032963765.png" alt="Broeks_0-1741032963765.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 20:16:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4593584#M7673</guid>
      <dc:creator>Broeks</dc:creator>
      <dc:date>2025-03-03T20:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging in VSCode: Failed to get refresh token</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4593698#M7674</link>
      <description>&lt;P&gt;Seems like you are using your creds for SJD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you try using service principal once&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add these environment variables to your `.devcontainer/devcontainer.json`:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this too didn't work&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replace Fabric’s managed identity flow with explicit service principal credentials&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"remoteEnv": {&lt;BR /&gt;"AZURE_TENANT_ID": "&amp;lt;tenant-id&amp;gt;",&lt;BR /&gt;"AZURE_CLIENT_ID": "&amp;lt;client-id&amp;gt;",&lt;BR /&gt;"AZURE_CLIENT_SECRET": "&amp;lt;secret&amp;gt;"&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 22:32:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4593698#M7674</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-03-03T22:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging in VSCode: Failed to get refresh token</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4594383#M7685</link>
      <description>&lt;P&gt;Thanks for the idea.&lt;/P&gt;&lt;P&gt;Is there any other way I can authenticate?&lt;/P&gt;&lt;P&gt;I'm not able to easily create a service principal.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 07:25:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4594383#M7685</guid>
      <dc:creator>Broeks</dc:creator>
      <dc:date>2025-03-04T07:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging in VSCode: Failed to get refresh token</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4596750#M7715</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/781658"&gt;@Broeks&lt;/a&gt;,&lt;BR /&gt;Thanks for reaching out to the Microsoft fabric community forum. Thank you &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/913195"&gt;@nilendraFabric&lt;/a&gt;, for your valuable input regarding the issue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After thoroughly reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please ensure that the Azure Account extension in VSCode is up to date. Issues with refresh tokens can sometimes be related to the extension version. Sign out and sign back in using the Azure Account extension to refresh credentials and resolve token-related issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure the fabric-synapse-runtime-1.2 Conda environment is properly activated in VSCode. Verify that the JAVA_HOME environment variable points to the correct JDK installation path, with OpenJDK 8 recommended to avoid compatibility issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check that the devcontainer configuration is correctly set up with all necessary dependencies and environment variables. Ensure the debugging configuration in the launch.json file is correctly set up for the Spark job, including the correct entry point and required arguments. If the issue persists, try clearing the cached credentials by removing the ~/.azuredatastudio/argv.json file, but note that this will remove all connections.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If this post&amp;nbsp;helps, then please give us ‘&lt;STRONG&gt;Kudos’&lt;/STRONG&gt; and consider&amp;nbsp;&lt;STRONG&gt;Accept it as a solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 14:29:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4596750#M7715</guid>
      <dc:creator>v-kpoloju-msft</dc:creator>
      <dc:date>2025-03-05T14:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging in VSCode: Failed to get refresh token</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4599345#M7750</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/902865"&gt;@v-kpoloju-msft&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've tested adding the Azure Account (which has been replaced by the Azure Resources extension) to my devcontainer.&lt;BR /&gt;This seem to do the trick for me.&lt;BR /&gt;&lt;BR /&gt;So thanks for your suggestions!&lt;BR /&gt;And could you update the devcontainer file in your documentation? So it's using this extension by default? This could prevent this issue with other people&lt;BR /&gt;&lt;A href="https://github.com/microsoft/SynapseVSCode/blob/main/samples/.devcontainer/devcontainer.json" target="_blank" rel="noopener"&gt;SynapseVSCode/samples/.devcontainer/devcontainer.json at main · microsoft/SynapseVSCode · GitHub&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Martijn&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 21:34:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Debugging-in-VSCode-Failed-to-get-refresh-token/m-p/4599345#M7750</guid>
      <dc:creator>Broeks</dc:creator>
      <dc:date>2025-03-06T21:34:03Z</dc:date>
    </item>
  </channel>
</rss>

