Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ADFS configuration

Use OneList root URL as the RelyParty URL, e.g. https://iqx.onelistapprovals.com follow this link for step-by-step instruction at the ADFS side: https://docs.microsoft.com/en-us/aspnet/core/security/authentication/ws-federation?view=aspnetcore-2.2

Use ADFS server Windows Event Log to investigate errors.

Configure RoleManager using the following JSON:

{
"MetadataAddress": "https://adfs.cloud.weir/FederationMetadata/2007-06/FederationMetadata.xml",
"Wtrealm": "https://onelist-dev.cloud.weir/"
}

Azure AD configuration

Poweshell script to add custom claim:

  1. Modified the App Registration Manifest: "acceptMappedClaims": true,
  2. New-AzureADPolicy -Definition @('{"ClaimsMappingPolicy":{"Version":1,"IncludeBasicClaimSet":"true", "ClaimsSchema":[{"Source":"user","ID":"onpremisessamaccountname","JwtClaimType":"onpremisessamaccountname"}]}}') -DisplayName "ExtraClaimsSAMAccountName" -Type "ClaimsMappingPolicy"
  3. Get the Service principal for the app id:  Get-AzureADServicePrincipal -Filter "servicePrincipalNames/any(n: n eq 'the app id')"
  4. Assigned policy to the Service Principal:  Add-AzureADServicePrincipalPolicy -Id <ObjectId of the ServicePrincipal> -RefObjectId <ObjectId of the Policy>

DO NOT use the .Net MicrosoftAccount provider for Azure AD because it uses OAuth flow and won't be able to get custom claims. Only OIDC flow can retrieve custom claims.

Steps to register OneList on AAD: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app

The Redirect URI for OneList is: https://iqx.onelistapprovals.com/rolemanager/signin-azure

If OneList is registered for multi-tenant then tenant_id = common

Configure RoleManager using this JSON:

{
"clientid": "xxxxx",
"clientsecret": "xxxx",
"Authority": "https://login.microsoftonline.com/<tenat_id>/v2.0",
"CallbackPath": "/signin-azure",
"Prompt": "select_account",
"SaveTokens": false,
"UserNameClaim": "<custom user name claim>"
}

To avoid auto sign-in, add the following to the JSON.

"Prompt": "select_account