How can identify National Holiday?

공민혁 80 Reputation points
2024-07-03T00:19:05.43+00:00

Hello,

I'm using API to get calendar list,

GET /users/{id | userPrincipalName}/calendars

I want to know is there anyway to identify National Holiday.

There is "Korean Holiday" in my calendar that seems outlook made

Want to specify that calendar with programming.

Thank you for your assistance.

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

Accepted answer
  1. Yakun Huang-MSFT 6,340 Reputation points Microsoft Vendor
    2024-07-03T02:37:00.71+00:00

    Hi @공민혁

    Yes, you can get national holidays through the calendar "Korean Holidays".

    First you can list all the calendars by requesting below and then find the ID of the Korean holiday calendar.

    GET /users/{id | userPrincipalName}/calendars
    

    The calendar can be obtained by sending the following request with the ID.

    GET /users/{id | userPrincipalName}/calendars/{id}
    

    All events in the calendar can also be obtained by requesting the following:

    GET /users/{id | userPrincipalName}/calendars/{id}/events
    

    See the link below for more details:

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

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

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

    Hope this helps.

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


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.