Is it possible to add hyperlinks in the body content of the calendar event schedule when using Create Event with Microsoft Graph?

DanielTorralba-3123 41 Reputation points
2023-01-12T14:12:42.0866667+00:00

I was trying to add a clickable link to the meeting invitation. Using the URL itself as the text works fine, but my concern is when using a hyperlink as the clickable link instead. I'm currently following this article for reference and wasn't able to see anything yet that covers this: https://learn.microsoft.com/en-us/graph/api/calendar-post-events?view=graph-rest-1.0&tabs=javascript

I was hoping to be able to create something like the one in the image below (screenshot from Outlook calendar)

User's image

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Srinivasa Rao Darna 6,761 Reputation points Microsoft External Staff
    2023-01-12T15:45:42.6233333+00:00

    Hello @DanielTorralba-3123 ,

    You can use following sample snippet to create an event with a hyperlink "contentType": "html".

    {
        "subject": "Event with Hyperlink",
        "body": {
            "contentType": "html",
            "content": "<a href='https://developer.microsoft.com/en-us/graph/graph-explorer'>link text</a>"
        },
        "start": {
            "dateTime": "2023-01-13T15:00:00",
            "timeZone": "India Standard Time"
        },
        "end": {
            "dateTime": "2023-01-13T16:00:00",
            "timeZone": "India Standard Time"
        },
        "attendees": [
            {
                "emailAddress": {
                    "address": "******@contoso.com"
                },
                "type": "required"
            }
        ]
    }
    

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

    2 people found this answer helpful.
    0 comments No comments

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.