web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send an HTTP request t...
Power Automate
Answered

Send an HTTP request to SharePoint Invalid JSON

(3) ShareShare
ReportReport
Posted on by 23

Hello community!
 
 
I want to update AllDayEvent field with Send an HTTP request to SharePoint action.
 
 

 
I get error: 
 
{
  "status"400,
  "message""Invalid JSON. A token was not recognized in the JSON content.,
  "source""<mySPOSiteUrl>/_api/web/lists/getbytitle('Team%20Calendar')/items(251)",
  "errors": [
    "-1",
    "Microsoft.SharePoint.Client.InvalidClientQueryException"
  ]
}
 
 
I think it is matter of formatting, but I checked all options:
 
"fAllDayEvent": true
"fAllDayEvent": True
"fAllDayEvent": "true"
"fAllDayEvent": "True"
'fAllDayEvent': true
'fAllDayEvent': True
'fAllDayEvent': 'true'
'fAllDayEvent': 'True'

 
 
But nothing works. Could you please advise?
Thank you!
​
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    why there is JSON keyword here in body field - i think that is causing error
     
     
     
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
  • JLS_ Profile Picture
    23 on at
    @Nived_Nambiar, it was partially. 
     
    I changed it to:
     
    {
      "__metadata": {
        "type": "SP.Data.Team_x0020_CalendarListItem"
      },
      "fAllDayEvent":true
    }
     
    and now I get BadGateway error. I am able to update any column on my list with the action, but not the AllDayEvent attribute. 
    Do you have any ideas?
     
     
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    The issue may be the URI path that you are using. I use the following with the body formatted as shown. I do not include any headers in the request. I have used this format dozens of times and have not had an issue. Be sure to replace "Display Name of List" with the display name of your list (as if that wasn't obvious). If you are not updating the item from the trigger, you will also need to update the ID to the correct item in the Uri as well.   
    Uri: 
    
    _api/web/lists/getByTitle('Display Name of List')/items(@{triggerOutputs()?['body/ID']})/validateUpdateListItem
    
    Sample body:
    
    {
        "formValues":[
    	{
    	    "FieldName": "ArchiveDate",
    	    "FieldValue": "@{formatDateTime(body('Archive_Date'),'MM/dd/yyyy')}"
    	},
    	{
    	    "FieldName": "Days",
    	    "FieldValue": "@{outputs('Compose_Days_to_Complete')}"
    	}
        ]
    }
    
    Body for multi-choice field:
    
    {
        "formValues": [
            {
                "FieldName": "Animals",
                "FieldValue": "Dog;Cat;Mouse"
            }
        ]
    }
    
    Body to set date field to null:
    {
     "formValues":[
     {
     "FieldName": "DateField",
     "FieldValue": null
     }
     ]
    }
    
     
  • Verified answer
    JLS_ Profile Picture
    23 on at
    Answer from MS was:
     
    It looks that the rest API requires has mandatory that start and end date are present when doing a update to an event to set him to all day.
     
    You can simply use like this : 
     
     

    Where the EventDate and the EndDate you can get from your  previous step, and keep all working. 
     
    And it is working.
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard