Forum Discussion

llueg's avatar
llueg
New Member
29 days ago
Solved

Pure Python Notebook: authenticate to Azure DevOps Artifacts using Fabric Workspace Identity

Can a Pure Python Fabric notebook running under a Workspace Identity obtain an Azure DevOps access token so that `pip install --index-url ...` can authenticate without a PAT?

It would be very nice if we could use the Workspace Identity to authenticate directly against a DevOps Feed in order to pull dependencies, as that would allow DevOps to directly target Feed-permissions for that Workspace (in particular, `Feed Reader`). For Spark Notebooks, we can use a Connection to do that, but for Pure Python Notebooks I can't find a documented way.

At the end of the day, one needs a token to pass to `pip` in order to bootstrap the notebook's runtime environment from the Feed, but as far as I can see there is no documented way to generate that token from the Workspace Identity. Currently, I'm using a keyvault'ed PAT. However, while this is fine-ish on the Fabric-side, it requires a dedicated Identity on the DevOps side, which I'd like to avoid.

  • Hi llueg​ 

    In simple terms, a workspace identity never gets a token so that is why it can be used with Azure Devops. You will need to use a client ID and client secrets from an app registration in order for this to work. All your existing PAT.

5 Replies

  • Workspace Identity in a Fabric Python notebook cannot get an Azure DevOps / Azure Artifacts token. Token APIs don’t expose an Azure DevOps audience. Python notebooks also don’t participate in the Environment-based Azure Artifacts flow used by Spark.

  • v-csrikanth's avatar
    v-csrikanth
    Icon for Community Support rankCommunity Support

    Hi llueg​ 
    We would like to inquire whether have you got the chance to check the solutions provided by other users in community to resolve the issue. We hope the information provided helps to clear the query. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.

  • v-csrikanth's avatar
    v-csrikanth
    Icon for Community Support rankCommunity Support

    Hi llueg​ 

    We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

    Thank you.

    • llueg's avatar
      llueg
      New Member

      Hi v-csrikanth​ ,

      thanks for reaching out. There is no definite solution yet; both responses so far were unmoderated AI Slop.

  • Hi llueg​ 

    In simple terms, a workspace identity never gets a token so that is why it can be used with Azure Devops. You will need to use a client ID and client secrets from an app registration in order for this to work. All your existing PAT.