I am writing an application to access data (email, contacts, calendar) of user in office 365. So i need to enable the access to my for external user.
I've followed the instructions of microsoft office here (http://msdn.microsoft.com/en-us/library/azure/dn132599.aspx#BKMK_MultiT) and defined in the Azure portal my app as a multi-tenant.
Then I have to use Oauth2 to access the data ( http://blogs.msdn.com/b/exchangedev/archive/2014/03/25/using-oauth2-to-access-calendar-contact-and-mail-api-in-exchange-online-in-office-365.aspx )
When I follow the steps in the link above, I get an error in the response of the first get request (the authorisation request):
request sent:
GET_https://login.windows.net/{key_provided}/oauth2/authorize?response_type=code&client_id={client_id_of_my_app}&redirect_uri={redirec_uri_of_my_app}&resource=https:%2f%2foutlook.office365.com%2f&state=5fdfd60b-8457-4536-b20f-fcb658d19458
response:
{redirec_uri_of_my_app}error=access_denied&error_description=AADSTS50034%3a+User+account+is+not+registered+for+the+account.%0D%0ATrace+ID%3a+3d9957b5-3d26-4193-b56a-0fbecd216499%0D%0ACorrelation+ID%3a+3ff14789-ca86-47f1-a02b-baaf084c416e%0D%0ATimestamp%3a+2014-08-14+19%3a11%3a15Z&state=5fdfd60b-8457-4536-b20f-fcb658d19458
And I can retrieve the auth code and the access token perfectly for the user of my account but not for external users.
Does anybody have an idea on how I can fix this problem?
Thank you!