Create new event with location

Christopher R 20 Reputation points
2025-01-09T21:47:19.62+00:00

Using this article:

https://learn.microsoft.com/en-us/graph/api/resources/location?view=graph-rest-1.0

I'm trying to use graph api to create a new calendar event with location. For location, I'm putting a random string name in displayName, say "Testing Room" for displayName. The event is created, but location is not there. Do I need to fill out more of the properties to generate the location when creating a new calendar event?

Microsoft Security Microsoft Graph
Developer technologies C#
{count} votes

2 answers

Sort by: Most helpful
  1. Christopher R 20 Reputation points
    2025-01-10T00:00:19.5833333+00:00

    Nevermind, I forgot to use new.

    0 comments No comments

  2. Anonymous
    2025-01-10T02:26:11.1833333+00:00

    Hello Christopher R,

    Thank you for reaching out to Microsoft Support!

    In response to your question, we tested the endpoint and everything worked well, the test results are as follows:

    Screenshot 2025-01-10 022233

    User's image

    When creating a new event with a location, you only need to fill in the displayName of the location in the location attribute to create the event successfully, and the returned response also contains the location information. Please refer to my test results to check the request body when you created the event.

    Reference document:

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

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further 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.