CoolRunner-dk/business-central-php

Error: An item with the same key has already been added. when requesting the ODataV4/$metadata

Opened this issue · 0 comments

Hi

I'm sorry for asking this here as I'm sure this is a problem with my Business Central set-up and not with this project. I don't know much about Business Central but I've followed some instructions on the web and got Azure AD OAuth configured and working with a trial Business Central set-up in the cloud. I've done some searching but I've not been able to find a solution to my problem.

The SDK appeared to work fine for the fist request but subsequent requests have generated this error:

Server error: `GET https://api.businesscentral.dynamics.com/v2.0/afcd4d86-327b-4160-baad-c45589c7eddb/production/ODataV4/$metadata` resulted in a `500 Internal Server Error` response:
{"error":{"code":"Unknown","message":"An item with the same key has already been added.  CorrelationId:  40da9e46-37e9-4 (truncated...)

Using the same request in Postman generates the same result.

{
    "error": {
        "code": "Unknown",
        "message": "An item with the same key has already been added.  CorrelationId:  d04c747b-44b2-41cc-82b2-57db29f88414."
    }
}

Do you know what I need to do in Business Central to fix this?