Configuring OAuth2- Office 365


 

This section provides details on configuring OAuth2 based services provided by Office 365.

 

Pre-Requisites for OAuth2 based authentication using Office 365

 

 

Setting up OAuth2 Office 365 Service

 

SapphireIMS application needs to be registered with the Office 365 service. Upon registering Azure will issue the client credentials in the form of a client identifier (Client ID) and a client secret. The Client ID is a publicly exposed string that is used by the service to identify the application and is also used to build authorization URLs that are presented to users. The Client Secret is used to authenticate the identity of the application to the service  when the application make a request to access a user's account and must be kept private between the application and the service.

 

Azure-DashLeftMenu.jpg

Azure-AppRegScreen.jpg

 

Azure-RegApp1.jpg

Note.gifNote: You can leave this field blank and later update it after getting the value from the SapphireIMS IdP configuration screen.

Note.gifNote: You can add multiple Redirect URIs including one for the Mobile application or for other SapphireIMS instances in the same organization. Click on the registered application. Click on 'Authentication' and 'Add URI'.

 

Azure-RegApp2.jpg

 

Azure-RegApp3.jpg

Azure-RegApp4.jpg

Azure-RegApp5.jpg

Azure-RegApp6.jpg

Azure-RegApp7.jpg

Azure-RegApp8.jpg

Azure-RegApp9.jpg

 

Adding Office 365 IdP in SapphireIMS

 

OAuth2-IdPList.jpg

Platform-Off365-BaseURL.jpg

 

Note.gifNote: For the mobile application use 'MobileApp' instead of 'SapphireIMS' in the base URL.

OAuth2-Idp1.jpg

Platform-Off365-IdPEntry.jpg

 

 

Serial No. Field Name Description

1

Identity Provider

Select the name of the identity provider as 'Office 365'.

 

2

Name

Enter a name for the IdP.

3

Alias

The alias uniquely identifies an identity provider and it is also used to build the redirect URI.

 

4

Redirect URI

The Redirect URI is used by Office 365 to redirect the user to the application after authentication. This is a display-only field and is generated using the Base URL and Alias.

Note.gifNote: Once the IdP is configured, this URI needs to be copied and pasted into the 'Redirect URI' field while registering the application in the Azure portal.

5

ClientID

Enter the Client ID generated during SapphireIMS registration in Azure portal.

6

Client secret

Enter the Client secret generated during SapphireIMS registration in Azure portal.

7

Default scopes

SapphireIMS can ask for the scopes for authorization which are entered here. By default if left blank, SapphireIMS requests for email, profile, offline access and openid which are minimally required. Note that in Office 365 OAuth Consent screen, these scopes should have been present.

8

Enable

Enable/Disable this identity provider

 

9

Authenticate by Default

This setting needs to be enabled when the SapphireIMS login screen needs to be hidden. If enabled, on entering the SapphireIMS URL, it directly takes the user to the SapphireIMS home page if the user is already logged into Office 365. By default, this is disabled.

10

Icon

Select the icon to click on the SapphireIMS login screen which will allow logging in via Office 365 authentication. The default is Microsoft.

11

Color

Select the color of the icon.