Forum Discussion
Failed to get Workspace Identity access token. The error message is: Datasource interception failed
Hi,
I have built a pipeline that loads sensitive data using notebooks. Due to data governance requirements, I should not have direct access to the workspace.
However, when I run the pipeline via a scheduled trigger, it fails with the following error:
"Failed to get Workspace Identity access token. Datasource interception failed with PowerBINotAuthorizedException."
Additionally, I’m unable to view the notebook snapshot.
So far, I’ve validated the following:
- Workspace Identity is enabled on the workspace
- The pipeline/activity is configured to use Workspace Identity
- The Workspace Identity has been granted permissions on the pipeline and all referenced items
- The Workspace Identity has been assigned Admin role
- Tenant and admin settings have been reviewed
Observed behavior:
- When I am assigned to the workspace → the pipeline runs successfully
- When I am removed from the workspace → the pipeline fails
This suggests that the execution is still dependent on my user identity rather than the Workspace Identity.
Has anyone encountered this issue or can provide guidance on what might be missing in the configuration?
Thanks in advance.
Connection
Hi,
Apologies for the delayed response.
I was able to identify the root cause yesterday afternoon and implement a workaround that appears to be effective. I say “appears” because, while I’ve successfully tested it in both Dev and UAT environments, I still need to confirm the results after the production notebook runs tomorrow.
As is often the case with some of these more difficult-to-diagnose issues, the solution turned out to be relatively straightforward. An Admin/Member of the workspace needed to assume ownership of all notebooks where I was previously listed as the owner.
Unfortunately, It was not possible to transfer ownership to the workspace identity. This means there is some residual risk that the issue could reoccur in the future—particularly if the current owner leaves the organization or loses access due to internal governance policies related to sensitive data.
I appreciate your guidance and suggestions throughout this process—they were very helpful.
Thanks
4 Replies
- v-aatheeque
Community Support
Hi Idia88
Thanks for raising query in Microsoft Fabric Community Forum.Thank you for sharing the screenshots and validation details.
Based on the provided configuration, Workspace Identity appears to be configured correctly:
- Workspace Identity is enabled
- Notebook activity is configured to use Workspace Identity
- Required permissions are granted
- Tenant settings are enabled
The primary concern now appears to be Error Code: 2011
"Failed to get Workspace Identity access token.
Datasource interception failed with PowerBINotAuthorizedException"Since the pipeline succeeds only when your user account remains in the workspace, this suggests the notebook execution may still be internally dependent on the user identity context instead of fully switching to Workspace Identity authentication.
To further isolate the issue, please recreate :
- Create a new notebook with minimal test code
- Create a new pipeline with a fresh Notebook activity
- Rebind the Lakehouse attachment
- Test scheduled execution after removing workspace access
If the issue still reproduces, this may indicate a backend authorization/runtime issue related to Workspace Identity token acquisition for notebook execution.
Additional Refernce : Access a Notebook from a Pipeline to a Notebook in a Restricted Workspace - Microsoft Fabric | Microsoft Learn
https://learn.microsoft.com/en-us/fabric/security/workspace-identity-authenticate
https://learn.microsoft.com/en-us/fabric/data-engineering/fabric-connection-with-notebook
Hope this helps !!
Thank You.- Idia88Frequent Visitor
Hi,
Thank you for your response and for the detailed guidance.
I’ll follow your suggestions by recreating the notebook and pipeline, rebinding the Lakehouse, and testing the execution after removing workspace access. I’ll share the results once I complete these validations.
Thanks again for your support!
- v-aatheeque
Community Support
Hi Idia88
Just following up to check whether you were able to complete the validations and testing.Please let us know the outcome after recreating the notebook/pipeline, rebinding the Lakehouse, and testing after removing workspace access. Any observations or error details would help us proceed further.