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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
wojciech
Helper II
Helper II

Runing Notebooks under SPN

Hi,

Does anyone know whether it's possible to run Fabric notebooks under the security context of a Service Principal (SPN), either:

  • Directly via a scheduler

  • Within a pipeline activity

  • Via an API

I've found a few resources but haven't come across a definitive answer on whether it's supported - and if it is, what the preferred method would be.

Can anyone advise?

Thanks,
WJ

1 ACCEPTED SOLUTION
v-achippa
Community Support
Community Support

Hi @wojciech,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Currently running notebooks directly under an SPN context or running notebooks standalone using SPN is not supported. Notebooks always run under the identity of the user or the pipeline that triggers them.

The supported approach is to use the notebook in a Fabric pipeline and then trigger the pipeline using the Fabric REST API using SPN authentication.

  • Create a pipeline that includes the notebook as an activity.
  • Assign permissions to the Service Principal on the Fabric workspace like Contributor role or higher.
  • Use the REST API to trigger the pipeline run using an AAD access token for the SPN.

 

If this post helps in resolving the issue, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

View solution in original post

4 REPLIES 4
wojciech
Helper II
Helper II

 Thanks @v-achippa for claryfying... much appreciated

v-achippa
Community Support
Community Support

Hi @wojciech,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Currently running notebooks directly under an SPN context or running notebooks standalone using SPN is not supported. Notebooks always run under the identity of the user or the pipeline that triggers them.

The supported approach is to use the notebook in a Fabric pipeline and then trigger the pipeline using the Fabric REST API using SPN authentication.

  • Create a pipeline that includes the notebook as an activity.
  • Assign permissions to the Service Principal on the Fabric workspace like Contributor role or higher.
  • Use the REST API to trigger the pipeline run using an AAD access token for the SPN.

 

If this post helps in resolving the issue, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

Hi @v-achippa , Currently we have a
1)  ADF managed identity which has been given contributor access over the Fabric workspace where my fabric pipeline is.
2) We are using Fabric Rest API to call the fabric pipeline from adf using web activity and managed identity authenntication .
3) we see that the Fabirc Pipeline runs under the Managed identity context but the fabric notebook withing it , still takes the authentication of the person who last saved the fabric pipeline.

so it doesn't works according to your solution , please tell if i am wrong?

Thank you for the clear explanation, Anjan 🙌
Using the pipeline approach with SPN and REST API makes sense now. I’ll try triggering the notebook via Fabric pipeline as suggested and make sure the SPN has the necessary permissions.

Appreciate the detailed steps and clarification!

Helpful resources

Announcements
September Fabric Update Carousel

Fabric Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors