Graph API Calender Event Web Link has wrong encoding

JO-5324 61 Reputation points
2022-07-15T07:43:27.277+00:00

I am using the following Graph API endpoint:
GET https://graph.microsoft.com/v1.0/me/calendar/calendarView

The response contains events in the following format:
{
...
"id": "AAMkADZjMDVjNGY5LWUwMWQtNDRlMC05MTNmLTNjOWJmZjM1YjY4OQFRAAgI2mt1HuTAAEYAAAAAp32JOAzZfUqe3sNF-R569AcAjguvQoXmFUOqtPWAHs7uqgAAAAABDQAAjguvQoXmFUOqtPWAHs7uqgAANfM_SAAAEA==",
"webLink": "https://outlook.office365.com/owa/?itemid=AAMkADZjMDVjNGY5LWUwMWQtNDRlMC05MTNmLTNjOWJmZjM1YjY4OQFRAAgI2mt1HuTAAEYAAAAAp32JOAzZfUqe3sNF%2FR569AcAjguvQoXmFUOqtPWAHs7uqgAAAAABDQAAjguvQoXmFUOqtPWAHs7uqgAANfM%2BSAAAEA%3D%3D&exvsurl=1&path=/calendar/item",
...
}

As we can see the webLink property also contains the event ID, but is encoded.
When I use the following function to decode the webLink property:

window.decodeURIComponent('https://outlook.office365.com/owa/?itemid=AAMkADZjMDVjNGY5LWUwMWQtNDRlMC05MTNmLTNjOWJmZjM1YjY4OQFRAAgI2mt1HuTAAEYAAAAAp32JOAzZfUqe3sNF%2FR569AcAjguvQoXmFUOqtPWAHs7uqgAAAAABDQAAjguvQoXmFUOqtPWAHs7uqgAANfM%2BSAAAEA%3D%3D&exvsurl=1&path=/calendar/item')

I receive:
https://outlook.office365.com/owa/?itemid=AAMkADZjMDVjNGY5LWUwMWQtNDRlMC05MTNmLTNjOWJmZjM1YjY4OQFRAAgI2mt1HuTAAEYAAAAAp32JOAzZfUqe3sNF/R569AcAjguvQoXmFUOqtPWAHs7uqgAAAAABDQAAjguvQoXmFUOqtPWAHs7uqgAANfM+SAAAEA==&exvsurl=1&path=/calendar/item

When you compare this result with the original event ID you can see, that the result is different.

  • instead of _
    / instead of -
    etc.

So it seems that the webLink is encoded wrong.
Has anyone experienced the same?
If my assumption is correct where can I report this bug?

Thank you in advance.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,056 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. ShivaniRai-MSFT 2,726 Reputation points
    2022-07-15T17:01:21.427+00:00

    Hi @JO-5324 ,

    I am able to replicate this scenario. It seems to be by design and not a bug as we are able to access the event using webLink from the response.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments

  2. JO-5324 61 Reputation points
    2022-07-18T07:03:09.203+00:00

    It seems that MS is using web safe bas64 encoding, this is the cause for some different characters.

    0 comments No comments