Skip to content

Unable to Write to Virtual Tables in Dataverse Connected to Business Central #472

Open
@alwill

Description

@alwill

Description:
We are attempting to programmatically write data to the Customer and Company virtual tables that are connected to Business Central. These virtual tables reside in Dataverse and function correctly when accessed directly through the PowerApps portal at https://make.powerapps.com/.

However, when using our connection string in the C# application to connect to Dataverse, we are unable to write to these virtual tables.

Notably:
We can write data to other Dataverse tables.
We cannot write to the virtual tables associated with Business Central.
It seems that the authentication token generated by ServiceClient might not be receiving the necessary scope to write to Business Central tables.

What We've Tried:
We verified that the Azure App Registration has appropriate API permissions for both Dynamics 365 and Business Central.
The issue appears to be specific to virtual tables, as other Dataverse tables are not affected.

Error:
Message: Microsoft.OData.Client.DataServiceQueryException: An error occurred while processing this request. ---> Microsoft.OData.Client.DataServiceClientException: {"error":{"code":"Authentication_InvalidCredentials","message":"The server has rejected the client credentials. }} ---> Microsoft.OData.ODataErrorException: An error was read from the payload. See the 'Error' property for more details.

Question:
Is this behavior expected? Does ServiceClient support writing to virtual tables connected to Business Central, or are additional configuration steps needed for the token to include the required scope?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions