Skip to content

AddListItem to SP List using MsGraph is not allowed to provide null values for fields that allow have the option "require column to have information" set to false #656

@fuzemeister

Description

@fuzemeister

Please provide the following (and please check them off the list with [x]) before submitting this issue:

  • Expected behavior. Please provide links to the specific Microsoft Graph documentation you used to determine the expected behavior.
  • Actual behavior. Provide error codes, stack information, and a Fiddler capture of the request and response (please remove personally identifiable information before posting).
  • Steps to reproduce the behavior. Include your code, IDE versions, client library versions, and any other information that might be helpful to understand your scenario.

Expected behavior

When initializing a new list item object we provide 'null' for some fields if the source is empty or null:
image

Actual behavior

When initializing a new list item object we provide 'null' for some fields if the source is empty or null:
image

When submitting the newly created listitem to the GraphServiceClient:
image

This results in a Generic Service Exception, after investigating I realized this had to do with the field data types and there respective option to allow the field to have no content.

But since this week, it is no longer allowed to send null values using the MsGraph.

Steps to reproduce the behavior

Prepare a listitem object like in Expected Behavior.
Then try to add it using the MsGraph Core SDK

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions