Anusuya Goud
Anusuya Goud

Reputation: 171

Microsoft Graph API Error - Property content in payload has a value that does not match schema

Code with PUT request of "https://graph.microsoft.com/beta/external/connections/" was working somedays ago fine and now throwing error:

"{
    "error": {
        "code": "BadRequest",
        "message": "Property content in payload has a value that does not match schema.",
        "innerError": {
            "request-id": "a823ed79-63a2-4512-864e-acdd15e523f7",
            "date": "2020-04-17T03:01:01"
        }
    }
}"

Tried to execute request in C# dotnet console application, Graph Explorer, Postman and receive same error across
Graph Explorer screenshots below:
Body of my PUT request

Error Message

Any suggestions on how to resolve this error? Can there be any changes to beta release without proper documentation?

Upvotes: 1

Views: 8725

Answers (1)

Raju
Raju

Reputation: 46

Content has been made a complex type with type & value. Refer to the docs for more details: Microsoft Graph Connectors indexing API

PUT https://graph.microsoft.com/beta/connections/contosohr/items/TSP228082938
Content-type: application/json
{
  "@odata.type": "microsoft.graph.externalItem",
  "acl": [
    {
      "type": "user",
      "value": "49103559-feac-4575-8b94-254814dfca72",
      "accessType": "deny",
      "identitySource": "Azure Active Directory"
    }
  ],
  "properties": {
    "title": "Error in the payment gateway",
    "priority": 1,
    "assignee": "[email protected]"
  },
  "content": {
    "value": "<h1>Error in payment gateway</h1><p>Error details...</p>",
    "type": "html"
  }
}

Upvotes: 0

Related Questions