1

I'm trying to make a auth with microsoft azure, I've registered my app in some places like the Azure portal, y the link to register app in easyauth.azurewebsites.net, enven here apps.dev.microsoft.com, and then i copy de App Id in my code, also i'm trying to use the Graph API to auth and to use some Outlook services in a connection to a local app using lampp, and the app is in php. when I register the app i use the url localhost/app/app.php

here's the code I'm trying with easy auth

 <script src="jquery-3.2.1.js"  type="text/javascript"></script>
 <script type="text/javascript">
  $(document).ready(function(){
    $("#theButton").on('click',function(){

        AzureADAuth.getAccessToken()
            .then(function(token){
                alert(token);
            })
            .error(function(err){
                alert("something gone wrong") 
            });
    });
});

  • What exact issue are you running into? Do you want to connect to Azure Active Directory from PHP web application ? If yes ,please refer to this [thread](https://stackoverflow.com/questions/33509761/connect-to-azure-active-directory-from-php-web-application) – Nan Yu Jul 31 '17 at 07:59

1 Answers1

0

I don't see an exact question so instead I'll just give you a general answer. To support either Azure AD (work or school accounts) or Microsoft Accounts (outlook, xbox, hotmail) you can register your the app inside the App Registration Portal. Then, you'll need to configure this application by creating an app secret/password and set a redirect URI.

Then you can integrate the app with some OAuth2.0 library. I've written a small PHP sample using the phpleague OAuth2.0 client that you can checkout for this.

Daniel Dobalian
  • 3,129
  • 2
  • 15
  • 28