โ12-30-2024 03:34 AM
i am facing issue :- [UNITY_CREDENTIAL_SCOPE_MISSING_SCOPE] Missing Credential Scope. Unity Credential Scope id not found in thread locals.
Issue occurs:-
when we try to list files using dbutils.fs.ls
and also this occurs at times when we try to write or read a parquet file
This occurs 4 in 10 times a day. This occurs in prod as well .
No Proper fix has been Documented.
Can someone help here ? This is blocked since many days
โ12-30-2024 05:03 AM
Hi @kasiviss42,
Are you using any Scala code in your notebook?
The error [UNITY_CREDENTIAL_SCOPE_MISSING_SCOPE] Missing Credential Scope. Unity Credential Scope id not found in thread locals
that you are encountering when using dbutils.fs.ls
and while reading or writing parquet files is a known issue related to Unity Catalog in Databricks. This issue occurs because Unity Credential Scopes are stored as thread locals, and in certain scenarios, such as when using Scala thread pools, these scopes are not transferred to the new threads, leading to the error
โ12-30-2024 08:52 AM
Its python
โ12-30-2024 09:16 AM
Hi @kasiviss42, Thank you for sharing the error details!
To provide better guidance, could you clarify the following details about your environment and use case?
Cluster Configuration:
spark.databricks.unityCatalog.singleUserAutoGlobalScope
to true
?Workload Details:
Specific Context:
Setup and Logs:
โ12-30-2024 09:51 AM
1. Cluster Configuration
โ12-30-2024 12:31 PM
@kasiviss42 thanks for sharing these details.
We can potentially get to the root cause by enabling the traceLogging for UC, but the communication will not be efficient through this channel. Could you please raise a Support Ticket? We'd like to help you address this problem or at the very least find a workaround.
โ01-24-2025 06:26 AM
Any solution for this, I am facing this too when creating a thread and using SQL query inside it
โ01-24-2025 08:27 AM
Use dbr 15.4 lts and try once
โ01-24-2025 09:02 AM
Thanks for the reply.
Its working in dbr 15.4 but I want to use it with 13.3, is there a workaround?
โ01-24-2025 09:40 AM
Databricks has released the fix in DBR 15.4 LTS
not sure if there is any work around for < 15.4 versions
โ01-24-2025 09:51 AM
Thanks for the information.
Can you share me the link where they have mentioned that this has been fixed.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group