Reputation: 566
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.
Upvotes: 2
Views: 5096
Reputation: 224
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.
Upvotes: 2
Reputation: 3302
You have to register your app in the o365 AAD ( Azure Active Directory ) tenant first before authorizing your app to use o365 api. Check our this blog post:
http://www.mostafaelzoghbi.com/2015/10/identity-and-office-365-presentation-on.html
Check out the slides starting from #23.
Hope this helps.
Upvotes: 0