Skip to content

Bug report: external item add issue #6792

@mkm17

Description

@mkm17

Priority

(Medium) I'm annoyed but I'll live

Description

Hi everyone, I tried to use this command to add some external items, but unfortunately, I’m getting an error when adding an item with some custom properties.

Error: The request is malformed or incorrect.

Steps to reproduce

  1. Run external item add with parameters: --id "c6528a79-0d72-4f8c-6972-08dd7c2f4d78" --externalConnectionId "test" --content "Test object " --title "Test" --projectName "Project2" --url "https://localhost/items/c6528a79-0d72-4f8c-6972-08dd7c2f4d78" --acls "grant,everyone,everyone"

  2. Getting Error: The request is malformed or incorrect.

Expected results

This command should not throw an error.

Actual results

Error: The request is malformed or incorrect.

Diagnostics

Request:
{
"url": "https://graph.microsoft.com/v1.0/external/connections/test/items/c6528a79-0d72-4f8c-6972-08dd7c2f4d78",
"method": "put",
"headers": {
"Accept": "application/json;odata.metadata=none",
"Content-Type": "application/json",
"user-agent": "NONISV|SharePointPnP|CLIMicrosoft365/10.10.0",
"accept-encoding": "gzip, deflate",
"X-ClientService-ClientTag": "M365CLI:10.10.0",
"authorization": ""
},
"responseType": "json",
"decompress": true,
"data": {
"id": "c6528a79-0d72-4f8c-6972-08dd7c2f4d78",
"content": {
"value": "Test object ",
"type": "text"
},
"acl": [
{
"accessType": "grant",
"type": "everyone",
"value": "everyone"
}
],
"properties": {},
"title": "Test",
"projectName": "Project2",
"url": "https://localhost/items/c6528a79-0d72-4f8c-6972-08dd7c2f4d78"
}
}
Request error:
{
"url": "https://graph.microsoft.com/v1.0/external/connections/Test/items/c6528a79-0d72-4f8c-6972-08dd7c2f4d78",
"status": 400,
"statusText": "Bad Request",
"headers": {
"transfer-encoding": "chunked",
"content-type": "application/json",
"vary": "Accept-Encoding",
"strict-transport-security": "max-age=31536000",
"request-id": "60e280ab-fd06-423e-859b-ebd7121bd1c4",
"client-request-id": "60e280ab-fd06-423e-859b-ebd7121bd1c4",
"x-ms-ags-diagnostic": "{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"005","RoleInstance":"FR3PEPF00000449"}}",
"x-backendhttpstatus": "400",
"x-calculatedbetarget": "FRWP194MB2781.EURP194.PROD.OUTLOOK.COM",
"x-feserver": "FR4P281CA0333",
"date": "Wed, 09 Jul 2025 21:23:36 GMT"
},
"error": {
"error": {
"code": "InvalidRequest",
"message": "The request is malformed or incorrect.",
"innerError": {
"code": "PropertiesLimit",
"source": "properties",
"message": "Number of properties is limited between '1' and maximum: '128'.",
"date": "2025-07-09T21:23:36",
"request-id": "60e280ab-fd06-423e-859b-ebd7121bd1c4",
"client-request-id": "60e280ab-fd06-423e-859b-ebd7121bd1c4"
}
}
}
}
Error
at ExternalItemAddCommand.handleRejectedODataJsonPromise (file:///D:/projects/github/cli-microsoft365/dist/Command.js:286:27)
at ExternalItemAddCommand.commandAction (file:///D:/projects/github/cli-microsoft365/dist/m365/external/commands/item/item-add.js:78:18)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async ExternalItemAddCommand.action (file:///D:/projects/github/cli-microsoft365/dist/Command.js:208:13)
at async Object.executeCommand (file:///D:/projects/github/cli-microsoft365/dist/cli/cli.js:250:9)
at async Object.execute (file:///D:/projects/github/cli-microsoft365/dist/cli/cli.js:199:9)
at async file:///D:/projects/github/cli-microsoft365/dist/index.js:16:5
at async file:///D:/projects/github/cli-microsoft365/dist/index.js:4:1
Error
at ExternalItemAddCommand.handleRejectedODataJsonPromise (file:///D:/projects/github/cli-microsoft365/dist/Command.js:286:27)
at ExternalItemAddCommand.commandAction (file:///D:/projects/github/cli-microsoft365/dist/m365/external/commands/item/item-add.js:78:18)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async ExternalItemAddCommand.action (file:///D:/projects/github/cli-microsoft365/dist/Command.js:208:13)
at async Object.executeCommand (file:///D:/projects/github/cli-microsoft365/dist/cli/cli.js:250:9)
at async Object.execute (file:///D:/projects/github/cli-microsoft365/dist/cli/cli.js:199:9)
at async file:///D:/projects/github/cli-microsoft365/dist/index.js:16:5
at async file:///D:/projects/github/cli-microsoft365/dist/index.js:4:1

Timings:
api: 2984.7286ms
core: 10.0242ms
command: 3411.2231ms
options: 0.1503ms
total: 3422.6766ms
validation: 0.4923ms
Error: The request is malformed or incorrect.

CLI for Microsoft 365 version

v10.10.0

nodejs version

v22.14.0

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

No response

Additional Info

Maybe I ran this command incorrectly, but if I’m not mistaken, the fix is to use requestBody.properties instead of requestBody on line 131.

Image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions