1

I am using one of the Microsoft Graph API in my project, i.e Outlook mail - "listconferencerooms" api.

Although it is giving he result, but the rooms listed in the result is not as expected.

When I cross check the Api result with the Meeting rooms available in my mailbox, both are not matching. In fact everyday i see the same set of meeting rooms which is not changing as per availability.

Code as below,

    [HttpGet]
    [Route("api/GetMeetingRooms")]
    public async Task<string> getMeetingRooms()
    {
        //HttpResponseMessage message = null;
        try
        {
            AppConfig appConfig = new AppConfig();
            string token = await appConfig.GetTokenForApplication();
            string response = string.Empty;
            using (var client = new HttpClient())
            {
                client.BaseAddress = new Uri("https://graph.microsoft.com/");
                client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                HttpResponseMessage result = client.GetAsync("https://graph.microsoft.com/beta/me/findRooms").Result;
                response = result.Content.ReadAsStringAsync().Result;
            }
            return response;
        }
        catch (Exception ex)
        {
            return ex.Message;
        }
    }

Kindly help me whether I am using correct API to get all available meeting, Conference rooms for my organization?

Or since the API is in Beta version I am not able to get the correct result.

Krzysztof Janiszewski
  • 3,763
  • 3
  • 18
  • 38
Anita
  • 71
  • 6
  • I think you are using the correct API but not the correct request. Take a look at this link : [display list of available meeting room](https://stackoverflow.com/questions/46139426/how-to-display-a-list-of-available-meeting-rooms-at-present-using-microsoft-grap) – Fazie Jun 06 '18 at 08:21
  • Thank you @Fazie. API is working fine and giving proper result. Only thing is Meeting rooms and Conference room listing is done under different categories in my tanant. So I was not getting proper response. – Anita Jun 11 '18 at 06:52
  • In this thread itself I would like to add one more question.Is there a graph API to set OUT of Office – Anita Jun 11 '18 at 07:04

0 Answers0