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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
We are getting an error when running a Fabric Notebook with PySpark against a Data Lakehouse that has OneLake Data Access preview enabled. We are also schema enabled. The notebook attempts to run a query and it gives us an error that says:
OneSecurity error while invoking OneSecurity API isSystemContextRequired with response error {"code":"InternalError","subCode":0,"message":"An internal error occurred.","timeStamp":"2025-08-05T19:03:34.5458564Z","httpStatusCode":500,"hresult":-2147467259,"details":[{"code":"RootActivityId","message":"1e8211ef-7cda-4e89-9a52-dd9c6246d2be"},{"code":"Param1","message":"OneSecurity default error definition\n\nStatus: 400\nResponse: \n{\r\n \"code\": \"OneSecurityRoleCountLimitExceeded\",\r\n \"subCode\": 0,\r\n \"message\": \"Total role count in the GetRolesMetadata request has exceeded max allowed. Role count in request: 24, max allowed: 20.\",\r\n \"timeStamp\": \"2025-08-05T19:03:34.5209316Z\",\r\n \"httpStatusCode\": 400,\r\n \"hresult\": -2147467259,\r\n \"details\": []\r\n}"}]} and status code: 500 with error code: 500
When we researched this error, it appears there are too many nested groups for the context of the query and it’s resources for OneSecurity to work through. So, we removed several of the groups and even tested with one group on the lakehouse and it still errors and retries ~30 times. Then succeeds? We also tried creating a test user that had no groups, same result (same count of groups [24]. The normal runtime prior to this issue was only a few moments. Now it is hours. This is costing us A LOT of time and money and has impacted production workload. This HAS worked in the past and is only recently an issue since 08/01/2025. Does anyone have experience here with this issue?
Hi @lawlesm ,
Thanks for reaching out to the Microsoft fabric community forum.
Since the notebook is retrying around 30 times before it finally works, it might help to add some basic logging inside your notebook. You can log:
This can help you see if there’s a pattern, like increasing delays.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Community Support Team
We have added logging and nothing looks out of sort besides what I posted above. MS is slow on tickets... So we copied our data out to a new lakehouse without OneLake Data Access enabled and we are back to normal. Something is awry.
Hi @lawlesm ,
Thank you for the update, It’s good that moving the data to a Lakehouse without OneLake Data Access got you back to normal performance, but it definitely confirms something is off with the preview feature.
Even though you’ve found a workaround, I’d still recommend keeping the ticket open with Microsoft so they can investigate and fix the root cause.
Please refer below link on how to raise a contact support or support ticket.
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank you.
Hi @lawlesm ,
We are following up once again regarding your query. Could you please confirm if the issue has been resolved through the support ticket with Microsoft?
If the issue has been resolved, we kindly request you to share the resolution or key insights here to help others in the community.
Thank you.
User | Count |
---|---|
15 | |
4 | |
3 | |
3 | |
2 |