Is there anybody could answer me, thank you.
Conflict value between properties "location" and "locations" for the same event fetched through Graph API
There're some events I get through Graph API that have different value in properties "location" and "locations". For example
Value for "location"
"location": {
"displayName": "社内ミーティングスペース",
"locationType": "default",
"uniqueId": "社内ミーティングスペース",
"uniqueIdType": "private"
}
Value for "locations" in that same event
"locations": [
{
"displayName": "社内ミーティングスペース",
"locationType": "default",
"uniqueId": "",
"uniqueIdType": "unknown"
}
]
I don't know why this happened, weeks before they shared the same value for uniqueId and uniqueIdType. This causes some bugs on my app. Is there anyone has the same problem and tell me what kind of event that could have this problem. Thank you
2 answers
Sort by: Most helpful
-
-
Shweta Choudhary 601 Reputation points Microsoft Employee
2021-10-07T07:50:06.54+00:00 Thank you for reaching out.
Please refer to the below parameters for events API call.
This explains the values being returned.
You will also see a similar experience in the sample API response being talked about in the docs.
HTTP/1.1 200 OK
Content-type: application/json
Preference-Applied: outlook.timezone="Pacific Standard Time"
Content-length: 1932{
"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users('cd209b0b-3f83-4c35-82d2-d88a61820480')/events(subject,body,bodyPreview,organizer,attendees,start,end,location)",
"value":[
{
"@odata.etag":"W/\"ZlnW4RIAV06KYYwlrfNZvQAAKGWwbw==\"",
"id":"AAMkAGIAAAoZDOFAAA=",
"subject":"Orientation ",
"bodyPreview":"Dana, this is the time you selected for our orientation. Please bring the notes I sent you.",
"body":{
"contentType":"html",
"content":"<html><head></head><body><p>Dana, this is the time you selected for our orientation. Please bring the notes I sent you.</p></body></html>"
},
"start":{
"dateTime":"2017-04-21T10:00:00.0000000",
"timeZone":"Pacific Standard Time"
},
"end":{
"dateTime":"2017-04-21T12:00:00.0000000",
"timeZone":"Pacific Standard Time"
},
"location": {
"displayName": "Assembly Hall",
"locationType": "default",
"uniqueId": "Assembly Hall",
"uniqueIdType": "private"
},
"locations": [
{
"displayName": "Assembly Hall",
"locationType": "default",
"uniqueIdType": "unknown"
}
],
"attendees":[
{
"type":"required",
"status":{
"response":"none",
"time":"0001-01-01T00:00:00Z"
},
"emailAddress":{
"name":"Samantha Booth",
"address":"samanthab@a830edad905084922E17020313.onmicrosoft.com"
}
},
{
"type":"required",
"status":{
"response":"none",
"time":"0001-01-01T00:00:00Z"
},
"emailAddress":{
"name":"Dana Swope",
"address":"danas@a830edad905084922E17020313.onmicrosoft.com"
}
}
],
"organizer":{
"emailAddress":{
"name":"Samantha Booth",
"address":"samanthab@a830edad905084922E17020313.onmicrosoft.com"
}
}
}
]
}Hope this answers.
Thanks.