Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Is anyone else getting mwc token error on spark.sql execution with SPN accounts? SPN has contributor permission on the workspaces and the query refers to shortcut. Any ideas what can cause this?
Thanks,
Gayatri
Solved! Go to Solution.
It looks like it fails for a named user too all of sudden but worked fine with workspace identity at the same time. Seems like some intermittent issue.
Hi @gaya3krishnan86 ,
Thanks for posting in Microsoft Fabric Community.
The mwc token error when executing spark.sql with Service Principal accounts is usually tied to authentication and token handling. Even if the SPN has Contributor permissions on the workspace, it also needs the right data permissions on the underlying storage used by the shortcut. Please make sure the SPN is properly added as an identity in the Fabric workspace and can access the referenced data source.
From the behavior you described, since this involves a shortcut, testing a direct query on a Lakehouse or Warehouse table without the shortcut can help isolate if the issue is shortcut-specific.
Similar issues have been reported when running Spark SQL queries. Restarting the kernel can sometimes result in a โcapacity limit exceededโ exception, indicating that session or capacity availability can contribute to the error: Solved: Re: Spark SQL error: MetaException(message: Unable... - Microsoft Fabric Community
There have also been cases where Spark SQL jobs in Fabric returned mwc token errors due to regional outages or bugs in the Spark engine. These incidents were intermittent and region-specific, and in some cases the issue resolved on retry.
For reference, you can check: Solved: Re: Spark SQL error: MetaException(message: Unable... - Microsoft Fabric Community
Hope this helps. Please reach out for further assistance.
Thank you.
It looks like it fails for a named user too all of sudden but worked fine with workspace identity at the same time. Seems like some intermittent issue.
Hi @gaya3krishnan86 ,
Thanks for confirming this. Since it also fails for a named user but works with the workspace identity, it appears to be an intermittent platform issue.
If you need further assistance, please reach out.
Thank you.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |