Question about PHP Outlook REST API and his getUser method RRS feed

  • Question

  • Hi all,
    I read  tutorial on Outlook Rest API PHP by Jason Johnston, for solve a problem on my own php app.
    With this tutorial code or with my app, i have the same problem : whatever the Microsoft Account what I use, the getUser Method, returns me a JSON with an empty EmailAddress field, and no error.

    for example return:

    array (size=5)
      '@odata.context' => string '$metadata#Me(DisplayName,EmailAddress)' (length=74)
      '' => string ''00037ffe-XXXX-XXXX-0000-000000000000@XXXXXXXX-XXXX-XXXX-XXXX-aaaaaaaaaaaa')' (length=118)
      'Id' => string '00037ffe-XXXX-XXXX-0000-000000000000@XXXXXXXX-XXXX-XXXX-XXXX-aaaaaaaaaaaa'(length=73)
      'EmailAddress' => string '' (length=0)
      'DisplayName' => string 'puid-00037FFEXXXXXXXX' (length=21)
    Without this field, it’s impossible to call the API REST for me.
    Why this return ?
    Can I use the ID fields or the DisplayName fields on API?
    And if yes, how?
    Thanks for your reply.

    Friday, August 12, 2016 3:21 PM

All replies

  • Hi Xanadoo,

    I am trying to reproduce this issue with Office 365 REST API however failed. Here is the API I was testing:


    I suggest that you using the Fiddler to grab the request to see whether this issue relative to the specific code. 

    >>Can I use the ID fields or the DisplayName fields on API? 

    We can use the ID or the userPrincipalName instead of 'me'.  Here is an sample that get the messages for your reference:

    GET:{ID|userPrincipalName }/messages

    Regards & Jupiter

    Monday, August 15, 2016 2:04 AM