none
Unable to retrive Global Address List with https://outlook.office.com/api/beta/me/people API RRS feed

  • Question

  • I have an Exchange Online App and have a question how to retrieve Global Address List.

    The application calls https://outlook.office.com/api/beta/me/people API to diplay email address, display name, given name, surname and department on the UI for the user to select the destination address to send an email.

    I call this API and it used to respond like below. It selected EmailAddresses,DisplayName,GivenName,Surname and Department fields and filter the response with Directory source to retrieve Global Address List.

    API call<br>
    <pre>https://outlook.office.com/api/beta/me/people/?$select=EmailAddresses,DisplayName,GivenName,Surname,Department&$filter=Sources/Any+(source:+source/Type+eq+'Directory')</pre>

    Response<br>
    <pre>
    {"@odata.context":"https://outlook.office.com/api/beta/$metadata#Me/People(EmailAddresses,DisplayName,GivenName,Surname,Department)",
        "value":[
        {"@odata.id":"https://outlook.office.com/api/beta/Users('xxxxx')/People('xxxxx')",
         "Id":"xxxxx",
         "DisplayName":"Display Name",
         "GivenName":"Given Name",
         "Surname":"Surname",
         "Department":"Depertmane",
         "EmailAddresses":[{"Address":"who@example.com","Rank":0.0}]},
        ...
        ]}
    </pre>

    However I call the API the same way on 2020/2/18 and it doesn't return any address. The address count is 0.
    I called it again  without filtering it Directory source and found that it returns the address list of  Communication Hisotry source.

    I tried to call https://graph.microsoft.com/v1.0/users API instead like below but it returns the department value with null.

    https://graph.microsoft.com/v1.0/users?$select=mail,displayName,givenName,surname,department

    Questions:
    Has the behavior of this api changed to returns the address list of Communication Hisotry source?

    Is there any alternative API to retrieve the address list of  Directory source?

    Does https://graph.microsoft.com/v1.0/users require the teant administrator's permission to retrieve department value?




    Tuesday, February 18, 2020 8:47 AM

All replies

  • Hi,

    Based on your description, your issue is related to Office 365 API. Since Exchange Online forum mainly discusses and provide suggestions about Exchange Online issues, we will help you move this case to Exchange Server > Exchange Server Development forum. You will get more professional suggestions there. Thanks for your understanding.

    Regards,

    Joyce Shen


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    • Marked as answer by From Nara Friday, February 21, 2020 6:33 AM
    • Unmarked as answer by From Nara Friday, February 21, 2020 6:34 AM
    Wednesday, February 19, 2020 2:00 AM