Microsoft-graph-docs: Error creating SharePoint list item that has fields which names start with underscore

Created on 7 May 2018  路  10Comments  路  Source: microsoftgraph/microsoft-graph-docs

POST https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items

When attempting to create a SharePoint list item it fails with the following error.

{
    "error": {
        "code": "invalidRequest",
        "message": "Field '_fieldExample' is not recognied",
        "innerError": {
            "request-id": "8b54a4a4-5f14-47d0-8651-908043a9aea1",
            "date": "2018-05-07T07:56:52"
        }
    }
}

Here is an example JSON reqeust body to reproduce the issue:

{
  "fields": {
    "Title": "Title42",
    "_fieldExample": "aaa"
   }
}

However the field "__fieldExample"_ is present in the list:

The JSON of the field:

{
    "columnGroup": "Custom Columns",
    "description": "",
    "displayName": "_fieldExample",
    "enforceUniqueValues": false,
    "hidden": false,
    "id": "18012342-6f36-44dd-a660-ca27d194cc79",
    "indexed": false,
    "name": "_fieldExample",
    "readOnly": false,
    "required": false,
    "text": {
        "allowMultipleLines": false,
        "appendChangesToExistingText": false,
        "linesForEditing": 0,
        "maxLength": 255
    }
}

I'm following the documentation from the following link:

https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/listitem_create

sharepoint awaiting internal response product stack overflow

Most helpful comment

I tracked down what the issue was and have submitted a fix. I'll update this thread when it's deployed.

All 10 comments

Are there some changes? Because I also have faced with this problem.

Have the same problem. Would be nice to hear smth more about this issue from Microsoft side.

Faced similar problem recently. Is there any update from Microsoft?

I'm sorry to have to do this to you. We have a new triage process that our customer experience team are monitoring on our official channel for questions. This is StackOverflow with 'microsoft-graph' tag.
I was trying not to close these off here in the documentation GitHub issues repo and get them answered. This issues lists is specifically for documentation issues, not the underlying service, sdks or samples.
It's proving too hard for me to be single point of failure here in assigning the correct engineers to answer questions. It is best for questions to go on StackOverflow where they'll be monitored by a dedicated team and escalated internally to PMs through a defined process.

If possible, I would love for this bug to be prioritized :) The Microsoft Graph API is our companies direction forward, as well as Content Management/Intranet in SharePoint!

As an alternative, I was looking at how PowerApps connects to Sharepoint Lists and how they handled creating list items. It appears they use the old SharePoint Frankenstein api.... which is what i want to totally avoid doing!

I tracked down what the issue was and have submitted a fix. I'll update this thread when it's deployed.

@ificator

About how long does it take to get to production? I'm currently writing an ISharepointProvider lib to fallback to the old school _api sharepoint api (with xml and digests...yucky) and want to know how much effort i should put into it.

P.S I let our Microsoft Premier Developer Support focal point know this is an important feature for us! Thanks

I think it should almost be fully deployed now, so hopefully it's resolved for now. If not, I'd give it a go early next week by which time it should be done. If it still repros for you at that point let me know and we can investigate further.

just tested and underscores work now! Thanks @ificator 馃帀 馃帀 馃帀

Thanks for confirming @ntheile!

Was this page helpful?
0 / 5 - 0 ratings