Update time in email body dynamically based on recipient's local timezone using Microsoft Graph API

Paditham, Mohan krishna 0 Reputation points
2024-02-01T08:08:20.8633333+00:00

Hi Team, Good day. This is Mohan Krishna. I have a query regarding the Microsoft Graph API event send or update. We are using the Microsoft Graph in our application to send meeting invites to the participants. We are sending the start and end times in the email body statistically. But we want to update the start and end times in the email body dynamically by taking the timezone from recipient's local timezone. Can you please let me if that can be achievable or not using Graph API. If it can be done, please let us know the process.

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

1 answer

Sort by: Most helpful
  1. Sourabh Gupta 800 Reputation points Microsoft External Staff
    2024-02-03T10:41:50.9233333+00:00

    Hi Paditham, Mohan krishna, Thanks for reaching out.

    According to your descriptions, you have to find out time zone of the recipient using graph api and send them individual emails.

    In this document, we can get the user's mailbox Settings. We can use the API like this: GET /me/mailboxSettings/timeZone or GET /users/{id|userPrincipalName}/mailboxSettings/timeZone It will return the user's mailbox time zone settings. The response like this:

    {
    "@odata.context": "https://graph.microsoft.com/v1.0/XXX/mailboxSettings/timeZone",
    "value": "China Standard Time"
    }
    

    However, currently, Graph API does not support sending multiple emails invites for same event (in case the event is for multiple recipients). Being said that, please consider raising user voice here for the feature ask that you have so that it could be considered for future implementations.

    However, you can first create the invite and copy the joining link in the body of individual email which also contains the time calculated by fetching time zone as mentioned above.

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

    0 comments No comments

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.