5

I'm working on an Outlook Add-in which authenticates the user against Azure AD and runs queries against SharePoint Online sites. The app uses AngularJS and makes use of the ADAL.js and ADAL-Angular.js libraries to conduct the authentication process. The app works well within the browser, however fails during the authentication process when used through the Windows Version of Outlook.

Once the user inputs his username and password within the add-in in Outlook (Windows), and Internet Explorer window pops up with the message below:

AADSTS90056: This endpoint only accepts POST requests.

Screenshot of error

Has anyone encountered this issue? I've followed the Office Dev tutorials (below) to the letter, but still no luck...

https://github.com/OfficeDev/O365-Angular-GettingStarted

Matt Scerri
  • 51
  • 1
  • 2
  • What's the code you were using? Based on the URL of request, it is incorrect. The login URL for request the access token should be like `https://login.microsoftonline.com/o365e3w15.onmicrosoft.com/oauth2/authorize?response_type=id_token&client_id={clientId}&redirect_uri={redirectUrl}&state={stateid}&client-request-id={clientRequestId}&x-client-SKU=Js&x-client-Ver=1.0.7&nonce=ea73961c-93a7-4dfb-b2e5-33f819193034`. The **O365-Angular-GettingStarted** works well for me. Please share the detail code if it doesn't work. – Fei Xue Jul 22 '16 at 08:10

1 Answers1

0

I was getting same error while trying to get access token for Microsoft Azure Active directory. the problem was url.

using https instead of http solved my problem.

my correct url for token as follows: "https://login.microsoftonline.com/"

Ravi Anand
  • 5,106
  • 9
  • 47
  • 77