Forum Discussion
Get the ID used in a link for accessing a Booking appointment
Is there a way to get the ID used in a link to the booking appointment with Graph API?
https://outlook.office365.com/owa/calendar/[BookingCalendarAddress]/bookings/xxxxxxxxxxxxxxxxxxxxx
This ID is not the Appointment ID returned by graph API...
41 Replies
- hohohono2Copper Contributor
Just replying for visibility to let others know that there IS a working solution in Power Automate etc. to get this to work. Read the nested thread (Sukumar2021's reply and onwards) for the working solution.
- AndrewLFGPCopper Contributor
unfortunately for me it is not 100% accurate... prolly half of them come out not showing the reschedule/cancel portion of the actions in the link it generates
- hohohono2Copper Contributor
Right. I'm not sure if I mentioned this in this thread or another thread/question, but I found out* it has to do with the 5 minute delay. Something like, if you click the link after 5 minutes, it will show the Reschedule/Cancel buttons?
*It's been awhile since I've looked at this so I don't recall everything. I also had to create a new account since our old emails are being decommissioned, so I won't be able to see replies to my old subscriptions.
- prathapniecsCopper ContributorMST any suggestions?
- prathapniecsCopper ContributorAny Idea for the 1:N service booking? Does it have the (Base64String of the serlfserivceappointmentID)_"some more string"?Anyone decoded this ?
- hohohonoBrass Contributor
prathapniecs Hmm, you're right -- for 1:N services, the selfServiceAppointmentID is still a GUID/UUID, but the actual meeting URL is not returned in base64. I can't tell what it is.
Here's an example I have for a 1:N service booking:
- The SelfServiceAppointmentID (GUID) is 1400d058-9ee2-4865-8986-467f322d64e2
- The meeting URL ID is WNAAFOKeZUiJhkZ_Mi1k4unlGuHvJxVAt3btZqe9Hw81
- The base64 of that GUID is WNAAFOKeZUiJhkZ/Mi1k4g==. if we remove the last 3 characters (and also do the conversions of "/" characters and whatnot), then we get the first half of that meeting URL ID above!
I feel like that last half of the meeting URL ID can be obtained somehow, but I'm not well-versed in base64 or GUIDs or anything of that sort, so I haven't got a clue.
I'm thinking I can ask someone from MSFT about this, but in the meantime, does anyone else have an idea about this?
- Marco7403Copper ContributorJust for the sake of it i tried to do some reverse engineering and if you take the string just after the "WNAAFOKeZUiJhkZ_Mi1k4" that is "unlGuHvJxVAt3btZqe9Hw81" remove the last digit or letter and put two padding "=" at the end and you try to get the UUID you'll end up with: "b84679ba-c97b-50c5-2ddd-bb59a9ef47c3".
This works every time on every url i tried it on.
the problem is i couldn't find any way to associate the found UUID to anything reported from Microsoft Graph about the appointment.
I tried encoding the email of the booking user with UUID v3 or v5, endoding it with different namespaces (trying all the different uuid included in the appointment Graph details ) but ended up with nothing useful.
- developert2lprCopper ContributorIs this still the case?
Anyone have tips on getting appointment details by power automate or some other method? Looking for details on all appointment details- tpoltorakCopper Contributor
developert2lpr use GraphApi to get the details of the service, including "webUrl", which has the direct link to the service in it: https://learn.microsoft.com/en-us/graph/api/bookingservice-get?view=graph-rest-1.0
- nick_amisCopper Contributor
I tried this in PHP as follows but the resulting URL was invalid.
The Self Service Appointment Id guid looks like this: "bd01de34-acd7-44c1-9dbe-d4d2b4cedfb7"
$bytes = unpack("C*", hex2bin(str_replace('-', '', $guid)));
$base64 = base64_encode(call_user_func_array("pack", array_merge(array("C*"), $bytes)));This was the output for $base64: +zBNbEGoS7iXtg41xnewEg==
The doesn't look like the URL from MS Bookings as it only has alphnumerics. What have I missed?
Thanks, Nick
- Sukumar2021Copper Contributor
Martin-Coupal , did you ever found an answer to this question? I ran into the same issue where I need this booking id so that I can get back to an existing booking on the bookings page using this id. The appointment id stored in bookings is a different one that's returned by the graph API.
- Martin-CoupalIron Contributor
Sukumar2021, no I did not find this information. I guess it should be returned by the graph.microsoft.com/beta/bookingBusinesses/ api but it is not for now....
- Sukumar2021Copper ContributorFound the solution. Subscriptionid field is rather converted to short id used in the link. Subscriptionid is converted to 22 char shortid using convert.tobase64string method.