Forum Discussion
Debugging in VSCode: Failed to get refresh token
- 1 year ago
Hi Broeks,
Thanks for reaching out to the Microsoft fabric community forum. Thank you nilendraFabric, for your valuable input regarding the issueAfter thoroughly reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:
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.
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.
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.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.Thank you.
Hello nilendraFabric,
Thanks for your response!
I'm using the dev container provided by microsoft, this to ensure I don't have these issues.
But I've checked these pointers and they are configured correctly:
Seems like you are using your creds for SJD.
could you try using service principal once
Add these environment variables to your `.devcontainer/devcontainer.json`:
If this too didn't work
Replace Fabric’s managed identity flow with explicit service principal credentials
"remoteEnv": {
"AZURE_TENANT_ID": "<tenant-id>",
"AZURE_CLIENT_ID": "<client-id>",
"AZURE_CLIENT_SECRET": "<secret>"
}
- Broeks1 year agoHelper II
Thanks for the idea.
Is there any other way I can authenticate?
I'm not able to easily create a service principal.