web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Virtual Table Error wi...
Power Apps
Answered

Virtual Table Error with Environment Variable

(1) ShareShare
ReportReport
Posted on by 15

I'm trying to create a Virtual Table using the SQL Server connector in a Power Apps solution.

 

If I create the table without environment variables, it works in DEV environment connected to DEV SQL DB, but when deployed to ACC and PRD where I aim to connect to PRD SQL DB, it fails still connecting to the DEV SQL DB. Manually changing the Virtual Connector Data Source also didn't work.

 

So I'm trying to use the environment variable option when creating a virtual table to pass the SQL Server and Database name dynamically. However if the option is enabled, I'm blocked with table creation with the following error:

 

Error identified in Payload provided by the user for Entity :'', For more information on this error please follow this help link https://go.microsoft.com/fwlink/?linkid=2195293 ----> InnerException : Microsoft.OData.ODataException: One or more parameters of the operation 'msdyn_get_matching_datasource' are missing from the request payload. The missing parameters are: connection_id. at Microsoft.OData.ODataParameterReaderCore.EnterScope(ODataParameterReaderState state, String name, Object value) at Microsoft.OData.JsonLight.ODataJsonLightParameterDeserializer.ReadNextParameter(PropertyAndAnnotationCollector propertyAndAnnotationCollector) at Microsoft.OData.ODataParameterReaderCore.ReadImplementation() at Microsoft.OData.ODataParameterReaderCore.<>c.<Read>b__18_0(ODataParameterReaderCore thisParam) at Microsoft.OData.ODataParameterReaderCore.InterceptException[T](Func`2 action) at Microsoft.Crm.Extensibility.ODataV4.CrmODataActionPayloadDeserializer.Read(ODataMessageReader messageReader, Type type, ODataDeserializerContext readContext) at Microsoft.AspNet.OData.Formatter.ODataInputFormatterHelper.ReadFromStream(Type type, Object defaultValue, IEdmModel model, ODataVersion version, Uri baseAddress, IWebApiRequestMessage internalRequest, Func`1 getODataRequestMessage, Func`2 getEdmTypeDeserializer, Func`2 getODataPayloadDeserializer, Func`1 getODataDeserializerContext, Action`1 registerForDisposeAction, Action`1 logErrorAction).

I have the same question (0)
  • Vish WR Profile Picture
    3,648 on at
    Hi Good Day 

    This error happens because the SQL virtual table creation cannot resolve the required connection_id when using environment variables

    👉 In other words, the wizard is failing because the connection reference is not properly bound during provisioning.

     

    Use one of these instead:

    • Use Connection Reference per environment (recommended)
    • Or create/rebind the virtual table after deployment instead of during creation
     
     
     
     
      Vishnu WR
     
    Please  Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like 
     
     
     
  • Suggested answer
    Haque Profile Picture
    3,522 on at
    Hi @ysjoys123,
     
    Based on the scenario, since manually changing the Virtual Connector Data Source after deployment didn't work, it suggests that the deployment pipeline or solution import process might be overriding or not properly updating the connection references.
     
     
    Typically, using environment variables or connection references is the recommended approach to ensure that virtual tables connect to the correct data source per environment. Without environment variables, the connection string or data source is hardcoded, causing deployments to retain the original DEV connection.
     
     
    If needed, recreate or update the virtual table in the target environment after deployment to refresh the connection if it is tedios to create it after deployment.
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • 11manish Profile Picture
    3,086 on at
    Issue is due to connection_id dependency
    Virtual Tables:
    • Not fully environment-variable driven
    • Require environment-specific connection references
    Best practice:
    • Use connection references per environment
    • Rebind or recreate Virtual Tables during deployment
  • Verified answer
    ysjoys123 Profile Picture
    15 on at
    It’s resolved now.
    I initially mentioned that manually changing the Virtual Connector Data Source did not work. The issue was fixed after redeploying the solution once the Virtual Connector Data Source was updated.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 490

#2
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

#3
11manish Profile Picture

11manish 302

Last 30 days Overall leaderboard