none
Outlook REST API returning invalid_request error RRS feed

  • Question

  • Using the Outlook REST API:

    https://msdn.microsoft.com/office/office365/api/contacts-rest-operations

    After making an initial successful request to get an auth_code, when trying to get the token we receive this error:
    "AADSTS90019: No tenant-identifying information found in either the request or implied by any provided credentials.

    We have our site registered through the Application Registration Portal.

    Any ideas on the above error?

    Thanks.


    Wednesday, May 18, 2016 6:15 PM

Answers

  • You need to use outlook account like @outlook.com, not @shopittome.com , try to register a new outlook account and try again.
    • Marked as answer by tippingpints Sunday, June 5, 2016 11:23 PM
    Wednesday, June 1, 2016 6:02 AM

All replies

  • Hi tippingpints,

    This is the forum to discuss questions and feedback for Outlook for Developers, I'll move your question to the MSDN forum for Office 365 for Developers

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=Office365forDevelopers

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
     
    Thank you for your understanding.
    Thursday, May 19, 2016 7:59 AM
  • I register an app through the Application Registration Portal , request the access token using  Authorization Grant Flow with authorization code like :

    POST https://login.microsoftonline.com/common/oauth2/v2.0/token

    Content-Type: application/x-www-form-urlencoded

    grant_type=authorization_code&code=<code>&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F&client_id=<CLIENT ID>&client_secret=<CLIENT SECRET>

    I can’t reproduce your error  , I have tested the Microsoft account and O365 develop account .

    So could you please provide more information, for example ,what is your testing account ? what is  your request to get the access token if possible ? Please try to put your tenant name in the authority endpoint, in place of 'common' . I would suggest you could refer to below tutorial for how to use Authorization Grant Flow with O365 API :

    https://dev.outlook.com/restapi/getstarted

    You could set the “contacts.read” scope to make your app access your contact information :

    https://login.microsoftonline.com/<Your Tenant >/oauth2/v2.0/authorize?client_id=< CLIENT ID >&redirect_uri=http%3A%2F

    %2Flocalhost:55066&response_type=code&scope=https%3A%2F%2Foutlook.office.com%2Fcontacts.read

    Monday, May 23, 2016 1:18 AM
    Moderator
  • Awesome thanks for the response, here are our requests with the SECRET removed. I have two redirect_url's set. One for the our contact importer and another at login/authorize for debugging. I'm not sure what <Your Tenant> is supposed to be? Thanks again.

    Auth GET
    https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=0000000040198717&scope=https%3A%2F%2Foutlook.office.com%2Fcontacts.read&response_type=code&access_type=online&approval_prompt=auto&redirect_uri=https%3A%2F%2Fdev.shopittome.com%2Fcontacts%2Foutlook%2Fcallback

    Token POST
    Host: login.microsoftonline.com
    Path: /common/oauth2/v2.0/token
    Params: {:client_id=>"0000000040198717", :client_secret=>"OUR_SECRET", :code=>"M02837e7f-bb13-91dc-d809-4690423cce24", :redirect_uri=>"https%3A%2F%2Fdev.shopittome.com%2Fcontacts%2Foutlook%2Fcallback", :grant_type=>"authorization_code"}

    Monday, May 23, 2016 7:02 PM
  • Any updates on this?

    Thanks!

    Sunday, May 29, 2016 3:13 PM
  • What is your test account ? Outlook account or O365 develop account ? If you are using O365 develop account ,please make sure your account works properly . Your tenant will like tenantname.onmicrosoft.com:

    https://kjaerulff.wordpress.com/2015/03/07/the-tenant-name-in-office-365/    


    Monday, May 30, 2016 3:19 AM
    Moderator
  • I signed up with my work email address.

    jeremy@shopittome.com

    This is an outlook.com account. It does give em an email address at Outlook.com as well.:

    outlook_FD2C2C9A252B0A1A


    Thanks, jeremy


    Monday, May 30, 2016 10:43 PM
  • You need to use outlook account like @outlook.com, not @shopittome.com , try to register a new outlook account and try again.
    • Marked as answer by tippingpints Sunday, June 5, 2016 11:23 PM
    Wednesday, June 1, 2016 6:02 AM
  • Thanks for the note.

    The account that I register our application/website with which will ask for permissions from our users to access their contacts needs to be an @outlook account?

    jeremy

    Saturday, June 4, 2016 1:59 AM
  • OK got it thanks. That was the issue, needed the @outlook account.
    Monday, June 6, 2016 2:59 AM