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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
wojciech
New Contributor III

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
Honored Contributor II

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

5 REPLIES 5
v-achippa
Honored Contributor II

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

youdao4
New Contributor II

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!

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?

v-achippa
Honored Contributor II

Hi @yashaswi_raj,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Yes currently while a pipeline can be triggered using a Service Principal or Managed Identity, any notebook activity inside it will still run under the identity of the user who last saved the pipeline, this is by design in fabric.
If you need notebooks to run fully under a Service Principal or Managed Identity context, that is not supported yet. I recommend submitting your detailed feedback and ideas through Microsoft's official feedback channels. Feedback submitted through these channels is frequently reviewed by the product teams and can contribute to meaningful improvements.

Fabric Ideas - Microsoft Fabric Community

 

 

Thanks and regards,

Anjan Kumar Chippa

wojciech
New Contributor III

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

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

Check out the January 2026 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (246)