Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
Anonymous
Not applicable

Running Mssparkutils.credentials.getToken() with Fabric scope doesn't work in Data Pipeline

There is a recent issue that occurs when running 

mssparkutils.credentials.getToken("https://api.fabric.microsoft.com/") in a notebook within the data pipeline. This command used to work previously, and the issue does not occur when the notebook is triggered directly. The error I receive is:
Py4JJavaError: An error occurred while calling z:mssparkutils.credentials.getToken. : java.io.IOException: 500 {"code":"TM_INTERNAL_ERROR","subCode":0,"message":"An internal error occurred.","timeStamp":"2024-10-10T01:43:59.3581074Z","httpStatusCode":500,"hresult":-2147467259,"details":[{"code":"RootActivityId","message":"2177f401-bd80-4fef-bf75-e7483b6a789e"}]} at com.microsoft.azure.trident.tokenlibrary.TokenLibrary.getAccessToken(TokenLibrary.scala:520)
Is there a reason for that and should I use another approach to get the token - I use it to create Notebooks in the workspace.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hey,

Yes a fix was deployed and the issue is now resolved.

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Hi @Anonymous ,

 

Thank you for your interest in this case.

 

Is my follow-up just to ask if the problem has been solved?

 

If so, can you accept the correct answer as a solution or share your solution to help other members find it faster?

 

Thank you very much for your cooperation!

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Anonymous
Not applicable

Hey,

Yes a fix was deployed and the issue is now resolved.

Anonymous
Not applicable

Any updates guys? We are facing the same problem here in my company. 

m98ateusz
Frequent Visitor

Was there any ticket related to it ? I am facing this issue right now 

Anonymous
Not applicable

Hey @m98ateusz,

I opened the following ticket: Ticket Form - Microsoft Digital (service-now.com)
The issue is still not solved, but the conversation is still in progress.

Though I found a workaround that works for my case, I've switched the scope/audience to "pbi".

Is there any timeline when it can be resolved ? 

Anonymous
Not applicable

No, I haven't been informed of a timeline.

Anonymous
Not applicable

Hi @Anonymous ,

 

Thanks for the reply from lbendlin .

 

It's really frustrating that code that used to work fine now fails to work without making any changes.

 

A 500 error, also known as an “internal server error”, means that the server encountered an unexpected situation while processing the request that prevented it from completing. This is usually a server-side problem, not a client-side problem.

 

You can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.

 

It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.

 

The link of Power BI Support:  https://powerbi.microsoft.com/en-us/support/

 

For how to create a support ticket, please refer to How to create a support ticket in Power BI - Microsoft Fabric Community

 

Thank you for your understanding.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

lbendlin
Super User
Super User

500 points to a server malfunction rather than anything wrong with your code.  If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues .

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.