none
Internal server error while getting metadata of Office 365 Service Communications API RRS feed

  • Question

  • I am trying to get the metadata from Office 365 Management APIs. When I a make a call to the following Url

    > resource = "https://manage.office.com/api/v1.0/tenant-id/ServiceComms/CurrentStatus" 

    I get the data and the first line contains the following information 

    > @odata.context":"https://office365servicecomms-prod.cloudapp.net/api/v1.0/tenant-id/$metadata#CurrentStatus"



    From this, I wanted to retrieve the metadata Information. But it's not working and I am getting an internal server error

              string resource = "https://office365servicecomms-prod.cloudapp.net/api/v1.0/tenant-id/$metadata#CurrentStatus";
                using (HttpClient httpClient = new HttpClient())
                {
                    httpClient.Timeout = new TimeSpan(0, 2, 0);
                    httpClient.DefaultRequestHeaders.Authorization =
                        new AuthenticationHeaderValue("Bearer", _authResult.AccessToken);

                    httpClient.DefaultRequestHeaders.Add("Accept", "application/json");

                    HttpResponseMessage response =
                        await httpClient.GetAsync(resource);
                }

    In response, I get the Status code 500 Internal Server Error. I don't understand what I am doing wrong here. Anyone knows how to get the metadata from Office 365 Service Communications API
    Friday, June 14, 2019 4:19 PM