question

QuanLeMinh-7511 avatar image
0 Votes"
QuanLeMinh-7511 asked QuanLeMinh-7511 commented

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

microsoft-graph-calendar
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

QuanLeMinh-7511 avatar image
0 Votes"
QuanLeMinh-7511 answered

Is there anybody could answer me, thank you.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ShwetaChoudhary-8869 avatar image
0 Votes"
ShwetaChoudhary-8869 answered QuanLeMinh-7511 commented

Thank you for reaching out.

Please refer to the below parameters for events API call.

138407-image.png

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.


image.png (41.4 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I've read the API doc and also look through your example response, but I still don't see the link between them. As when I create a new event, the uniqueId in locations property is not an empty string. I just want to reproduce how to create an event like that. Thank you.

{
            "recurrence": null,
            "onlineMeeting": null,
            "body": {
                "contentType": "html",
                "content": ""
            },
            "start": {
                "dateTime": "2021-09-28T01:00:00.0000000",
                "timeZone": "UTC"
            },
            "end": {
                "dateTime": "2021-09-28T01:30:00.0000000",
                "timeZone": "UTC"
            },
            "location": {
                "displayName": "Secret location",
                "locationType": "default",
                "uniqueId": "Secret location",
                "uniqueIdType": "private"
            },
            "locations": [
                {
                    "displayName": "Secret location",
                    "locationType": "default",
                    "uniqueId": "Secret location",
                    "uniqueIdType": "private"
                }
            ],
            "attendees": []
        }
0 Votes 0 ·

Also I want to ask when did this API change? Before 25th September 2021 that value uniqueId was never an empty string or null or undefined. I just want some document confirm. Thank you.

0 Votes 0 ·

Hi, can you still there. My question is still not answered yet.

0 Votes 0 ·