This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have a custom package that I have imported to an environment. Suddenly my notebooks using this environment are running into an error:
ImportError: cannot import name 'AccessTokenInfo' from 'azure.core.credentials' (/home/trusted-service-user/cluster-env/trident_env/lib/python3.11/site-packages/azure/core/credentials.py)
My package uses azure-core version 1.38.2, it seems Fabric runtime 1.3 uses azure-core 1.30.2. My notebooks weren't running into this error before, and I have not made any updates to my package dependencies, I have basically changed nothing and my notebooks are suddenly breaking. Has the runtime changed it's azure-core dependency version? Am I not able to upgrade this built-in package version?
Solved! Go to Solution.
Only viable solution appears to be downgrading azure-core and azure-identity dependencies to those used by Fabric Runtime and refactoring the custom package.
Only viable solution appears to be downgrading azure-core and azure-identity dependencies to those used by Fabric Runtime and refactoring the custom package.
Hey @deborshi_nag can confirm the Spark Runtime has not changed for the environment, it is set at 1.3.
Understand the version of azure-core is controlled by Microsoft, can't understand why this has suddenly become breaking after no changes on our end, but not the first time it's happened in Fabric!
Hi @bmmtf,
What happens if you remove the custom library, save the environment, wait a few minutes, and then add it back in?
Proud to be a Super User! | |
After further investigation, it appears to be due to my azure-identity 1.25.2 package that depends on azure-core>=1.31.0. The azure-identity __init__.py file imports an AccessTokenInfo class from azure.core.credentials that is not present in azure-core version 1.30.2. Still not sure as to why this has randomly started raising the error, but worked fine in the past.
Hello @bmmtf one possible explanation is if someone changed the Spark Runtime in your Environment item. Microsoft unfortunately doesn't publish their Spark runtime version against the azure-core library version being used.
The version of azure-core is controlled by Fabric runtime. It may also change when Microsoft updates the Spark runtime!
Check out the April 2026 Fabric update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.