OAuth 2 Microsoft service
Admin Menu ► Integrations ► OAuth 2 ► OAuth 2 Microsoft service Setup App In Microsoft To set up an OAuth 2.0 client with Microsoft, you must first register a new application by using App registrations in the Azure Portal .
Admin Menu ► Integrations ► OAuth 2 ► OAuth 2 Microsoft service
Setup App In Microsoft
To set up an OAuth 2.0 client with Microsoft, you must first register a new application by using App registrations in the Azure Portal.
From Azure Portal home, under 'Azure services', select 'Azure Active Directory'
From the left hand menu, select 'App registrations'
Select 'New registration'
Register new application
Choose a good name as this is what is shown to users when they are asked to approve the permissions.
Under supported account types select either:
5A. 'Accounts in this organizational directory only (your organization's name - Single tenant)'.
**Single-tenant apps are only available in the tenant they were registered in, also known as their home tenant. For single tenancy to work properly complete the additional steps outlined below under 'Additional Single Tenancy Configuration'.
5B. 'Accounts in any organizational directory (Any Azure AD directory - Multitenant)'.
**Multi-tenant apps are available to users in both their home tenant and other tenants (meaning anyone with an Office 365 account will have access, unless domains are added to the 'Login domains' field (Step 19) which will restrict logins to specific domains.)
Choose 'Web' for redirect URI and add the callback URL. The callback URL should point to "your academy site URL + /admin/oauth2callback.php". If your AI LMS Platform site was available at https://lemon.edu/ the callback URL would be https://lemon.edu/admin/oauth2callback.php. It is important that your academy site uses https and not http. Microsoft will not allow the callback url if it is not using https.
Click 'Register'.
Application settings
Copy the 'Application (client) ID' to a safe place for later use.
Application (client) ID
Select 'Authentication' from side-bar menu.
Authentication
10. Ensure implicit grant flow is disabled.
Disable Implicit Grant Flow
11. Select 'API permissions' from side-bar menu.
API permissions
12. Make sure the "Microsoft Graph (1)" permissions section contains the "User.Read" permission.
Microsoft Graph
13. Select 'Certificates & secrets' from side-bar menu.
Certificates & Secrets
14. Click 'New client secret' to create a password/client secret.
New client secret
15. Add a description and select when the password/secret will expire.
Add a client secret
16. Copy the secret string value to a safe place for later use.
Secret string value
17. In the Academy go to OAuth2 services (Menu > Settings > OAuth2 Settings) and create a new Microsoft service.
Create new Microsoft service
18. Update the name if desired and enter the password/secret as the "Client secret" and the Application ID as the "Client ID".
Add client ID and secret
19. Make any additional configuration changes such as limiting login domains, whether a login button will show on the login page, and if email verification is required.
Additional settings
Additional Single Tenancy Configuration
Once the above steps have been completed, click "Overview" if not already selected and choose "Endpoints".
End Points
From the list of endpoints copy the OpenID Connect metadata document endpoint URL. It is only necessary to copy the portion up to and including "v2.0". In the example below, the copied URL would be, "
https://login.microsoftonline.com/96e0421d-d572-4839-9c32-b8bc00cf250b/v2.0/". Note that it is important to include the trailing slash.
End Points
Now return to your Academy and in the newly created OAuth2 Microsoft service, paste the endpoint in the 'Service base URL' field.
Service base URL
Save your changes.