Search code examples
office365sharepoint-onlineoffice365apiazure-ad-graph-apimicrosoft-graph-api

Office365 auth fail: Application with identifier XXX was not found in the directory YYY.onmicrosoft.com


I am writing a python app which must collect some data from user's SharePoint Online sites.

I am trying to connect to the SharePoint online via Office365 unified REST API (Microsoft Graph API). I've got client_id and key in Azure AD. My app redirects to 'https://login.microsoftonline.com/common/oauth2/authorize with parameters: redirect_uri, client_id, prompt=login and response_type=code
In the login page, after I enter my office365 dev account login and password, I get the following error on the bottom of login page:

Additional technical information:
Correlation ID: 8ae7b4b6-3431-4eac-883c-225637d40057
Timestamp: 2015-12-04 11:58:56Z
AADSTS70001: Application with identifier XXX was not found in the directory YYY.onmicrosoft.com

Any ideas on what could go wrong? What is the source of this error and how do I fix it? Any help is much appreciated.


Solution

  • May be you should check if the domain name you are loggin in with your office365 account is the same as the domain name in azure AD, if not, most likely not, create an app with multi-tenant.