php - Protect application with microsoft azure AD -


i build application azure directory.

i created apps here:

https://apps.dev.microsoft.com 

the problem is: people can connect application microsoft account.

it possible, because application in active directory, prevent connect on application except people in active directory?

i tried many apps active-directory magium , other use active directory azure graph api.

should put validation after

$entity = $ad->authenticate(); 

i work php.

anyone know can fixed ?

update

authorization url:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?state=..&scope=..&response_type=code&approval_prompt=auto&client_id=&redirect_uri=... 

please replace common in sign-in uri name of azure ad (e.g company.onmicrosoft.com). part of sign-in uri be:

https://login.microsoftonline.com/{company.onmicrosoft.com}/oauth2/v2.0/authorize?...rest... 

this ensure users azure ad able sign in. can read more endpoints in azure ad v2 here: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols#endpoints.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -