Ms graph TimeOff note/description/comment

Ruslan Back-end developer 0 Reputation points
2024-04-26T17:47:13.4433333+00:00

When a user creates a timeoff, he can leave a comment or note for that timeoff. Sometimes this is very important; for example, there may be a description of the reason for changing the schedule and the working time. But for some reason I can’t find anywhere the opportunity to get this note via API. For example, you can get this note in the shift:

https://learn.microsoft.com/en-us/graph/api/schedule-list-shifts?view=graph-rest-1.0&tabs=http

draftShift.notes

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

1 answer

Sort by: Most helpful
  1. awijekoon 950 Reputation points Microsoft Vendor
    2024-04-27T21:16:24.59+00:00

    @Ruslan Back-end developer

    have you tried timeOffRequests api ? .API response has a property called “senderMessage”, which is equivalent to the value of “note”.

    senderMessage property is not mentioned in the documentation. you could check this in graph explorer.

    https://learn.microsoft.com/en-us/graph/api/timeoffrequest-get?view=graph-rest-1.0&tabs=http#examples

    GET /teams/{teamId}/schedule/timeOffRequests/{timeOffRequestId}
    

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