EzeScan WebApps

Azure AD App Registration

  1. Navigate to the Azure Portal and select Azure Active Directory.
    image2020-12-3_15-8-45.png

  2. On the left menu select App Registrations.
    image2020-12-3_15-9-57.png

  3. Enter the following details and then click the Register button:

    Option

    Value

    Name

    EzeScan WebApps

    Supported account types

    Accounts in this organizational directory only ([Your tenant name here] only - Single tenant)

    Redirect URI

    Web - 

    https://ewa.domain.com.au/signin-oidc

     (Sub in the URL of your EWA install).


    image2020-12-3_15-12-18.png

  4. On the left menu click on the Authentication option.
    image2020-12-3_15-18-53.png

  5. Set the following options and then click Save:

    Option

    Value

    Logout Url

    https://ewa.domain.com/signout-oidc

     (Sub in the URL of your EWA install).

    Implicit Grant

    ID tokens

    Supported Account Types > Who can use this application or access this API?

    Accounts in this organizational directory only ([Your tenant name here] only - Single tenant)

    Advanced Settings > Allow public client flows

    No

    image2020-12-3_15-47-33.png

  6. On the left menu select the Overview option.
    image2020-12-3_15-49-9.png

  7. Take note of the Application (client) ID and the Directory (tenant) ID by mousing over then clicking the copy to clipboard button and saving them somewhere safe for later use.
    image2020-12-3_16-6-49.png

  8. Click on the Endpoints option in the top menu. 
    image2020-12-3_15-59-18.png

  9. Take note of the OpenID Connect metadata document URL by clicking the copy to clipboard button and saving it somewhere safe for later use.
    image2020-12-3_15-58-48.png

  10. You should now have the 3 respective values saved out ready to put into EzeScan WebApps appsettings.json file.
    image2020-12-3_16-11-24.png

  11. Navigate to Token configuration and click Add optional claim
    image2021-2-5_12-37-42.png

  12. Select the Token Type: ID, then tick the options to enable email, upn, family_name and given_name. Click the Add button.
    image2021-2-5_12-37-2.png

  13. If asked then tick the "Turn on the Microsoft Graph email, profile permissions" option and click Add.
    image2021-2-5_12-33-50.png

  14. Click Add groups claim
    image2021-8-17_11-47-1.png

  15. Set the following settings and then click Add:

    Option

    Value

    Select group types to include in Access, ID, and SAML tokens.

    Security groups

    Customize token properties by type (ID)

    Group ID

    Emit groups as role claims


    image2021-8-17_11-49-28.png

  16. Edit your appsettings.json files Authentication section to contain the following:

    JavaScript
     "Authentication": {
        "EnableApiKey": true,
        "Providers": {
           "OpenIdConnect": {
            "Authority": "https://login.microsoftonline.com/[Directory (tenant) ID]/v2.0",
            "ClientId": "[Application (client) ID]",
            "MetadataAddress": "[OpenID Connect metadata document]",
    	 		"TokenValidationParameters": {
              	"NameClaimType": "name"
            }
          }    
        }
      }
    
    
    

    Confirm your Authentcation section now looks like the following and save the file. 

    JavaScript
     "Authentication": {
        "EnableApiKey": true,
        "Providers": {
           "OpenIdConnect": {
            "Authority": "https://login.microsoftonline.com/81270000-0000-0000-0000-0000f000b68b/v2.0",
            "ClientId": "3523c7b7-0000-0000-0000-9463c2bffbf2",
            "MetadataAddress": "https://login.microsoftonline.com/81270000-0000-0000-0000-0000f000b68b/v2.0/.well-known/openid-configuration",
    	 		"TokenValidationParameters": {
              	"NameClaimType": "name"
            }
          }    
        }
      }
    
    
    


  17. Restart the IIS App Pool that runs EzeScan WebApps.

  18. Navigate to your EzeScan WebApps site and click the Login button.
    image2020-12-3_16-26-37.png

  19. Login as an Azure AD Administrator, tick the Consent box and then click Accept.
    image2020-12-3_16-30-20.png