microsoft / msopentech-tools-for-intellij

Plugin for easy and fast development to enable developers of Android Apps to connect to Office 365 services and Azure Mobile Services, and developers of Java middleware to connect to Azure compute services
Apache License 2.0
28 stars 34 forks source link

azure Rest API to get auth token fails #azure #383

Open sgcse01 opened 8 years ago

sgcse01 commented 8 years ago

tried the rest api

https://login.microsoftonline.com/common/Oauth2/authorize?client_id=9ba1a5c7-f17a-4de9-a1f1-6178c8d51223&response_type=code&redirect_uri=https%3F%2F%2Fmanagement.azure.com%2F

to get the auth code but I am getting the following response.

{returnResult=

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html class="win-hoverable" xmlns="http://www.w3.org/1999/xhtml" dir="ltr" style="background-color: rgb(0, 114, 198);" lang="iv" xml:lang="iv">

Error ``` ``` ```

</html>;Result=

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html class="win-hoverable" xmlns="http://www.w3.org/1999/xhtml" dir="ltr" style="background-color: rgb(0, 114, 198);" 
    lang="iv"
    xml:lang="iv">
    <head>
        <title>Error</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Expires" content="-1" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="PageID" content="i5030.2.0" />
        <meta name="SiteID" content="501148" />
        <meta name="ReqLC" content="1033" />
        <meta name="LocLC" content="1033" />
        <meta name="mswebdialog-newwindowurl" content="*" />

<script src="https://secure.aadcdn.microsoftonline-p.com/ests/2.1.2922.0/content/cdnbundles/jquery.1.11.min.js"></script>
    <link rel="SHORTCUT ICON" href="https://secure.aadcdn.microsoftonline-p.com/ests/2.1.2922.0/content/images/favicon_a.ico" />

<link href="https://secure.aadcdn.microsoftonline-p.com/ests/2.1.2922.0/content/cdnbundles/login.min.css" rel="stylesheet" />

<script src="https://secure.aadcdn.microsoftonline-p.com/ests/2.1.2922.0/content/cdnbundles/aad.login.min.js"></script>
    <script type="text/javascript">
        if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
            var msViewportStyle = document.createElement("style");
            msViewportStyle.appendChild(
                document.createTextNode(
                    "@-ms-viewport{width:auto!important}"
                )
            );
            msViewportStyle.appendChild(
                document.createTextNode(
                    "@-ms-viewport{height:auto!important}"
                )
            );
            document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
        }
    </script>



</html>;}

what am I missing?