Forum Discussion

SavioFerraz's avatar
SavioFerraz
Super User
8 months ago
Solved

Data Pipeline Parameterization Fails When Using Workspace Variables in REST Activities — Any Workaro

We follow the recommended pattern of using Workspace variables for environment management, but REST activities within Data Pipelines fail to resolve variable references, even though SQL and Notebook ...
  • tayloramy's avatar
    8 months ago

    Hi SavioFerraz

     

    By worksapce variable do you mean variable libraries? 

     

    I've not had any issues with them, but I am not using REST activities.  Have you tried making a pipeline parameter and setting that equal to the variable library? THat might bypass the REST activity needing to resolve it itself. 

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

  • Aala_Ali's avatar
    8 months ago

    Hi SavioFerraz 

    This looks like a limitation in the current preview of Variable Libraries.

    Workspace variables work perfectly in SQL and Notebook activities because those activity types already support resolving @pipeline().libraryVariables.xxx at runtime.

    However, the REST/Web activity doesn’t seem to evaluate library variables the same way. Instead, it treats the value as if it were a normal pipeline parameter, which is why you get the error:

    Parameter '<workspaceVariableName>' not found.

    I haven’t seen any official documentation that says REST activities fully support workspace variables, so for now I’d treat this as a preview gap rather than a misconfiguration on your side.

    simple reliable workaround:

    You can still use workspace variables—you just need one extra step:

    1. Add the workspace variable to the pipeline from the Library variables pane.
    2. Use a Set variable activity at the start of the pipeline to copy that value into a normal pipeline variable, for example:

    varBaseUrl = @pipeline().libraryVariables.BaseUrl


    In the REST activity, reference the pipeline variable instead:

    @variables('varBaseUrl')


    This avoids the error completely because the REST activity only sees a normal pipeline variable, which it can resolve.

    Here is the similar issue to yours may help you:
    https://community.fabric.microsoft.com/t5/Pipelines/Parameterized-connections-in-Data-pipelines/m-p/4654252

    If this helps please ✔ Give a Kudo • Mark as Solution – help others too!

    Aala Ali

    Pricing & Profitability Specialist | Data Analyst at Zain Telecom
    Group Leader – Microsoft Sudan Fabric User Group

    linked in profile: https://www.linkedin.com/in/aala-ali/

     

     

     

     

  • v-veshwara-msft's avatar
    8 months ago

    Hi SavioFerraz ,

    Thanks for reaching out to Microsoft Fabric Community.
    Just checking in regarding your question. Please let us know if the guidance shared by Aala_Ali and tayloramy helped in resolving your issue, or if you need any additional clarification on the workspace variable behavior in REST activities.
    Thank you.