# ADFS With OIDC Support

Active Directory Federation Services (ADFS) provides enterprise-level identity and authentication services, including support for OAuth2 and OpenID Connect (OIDC) authentication flows.

This article outlines the step-by-step process to create and configure an ADFS Application Group that supports the Authorization Code flow. Additionally, it covers user creation, application group setup, and application server configuration.

### **Prerequisites**

* Access to an ADFS server.
* Administrative rights to manage Active Directory (AD) and ADFS.
* Access to the OvalEdge application server.
* Knowledge of the OvalEdge domain name.

## Steps

### **User Creation in Active Directory**

* Log in to the ADFS Server.
  * Open the Windows search bar, type **Active Directory Users and Computers**, and launch the application.

    <figure><img src="/files/ZnIxQ6eewPonjHPYa8NC" alt=""><figcaption></figcaption></figure>
* Create a new user.
  * Navigate to the **Users** section.

    <figure><img src="/files/AKpaEDaGUgYytLSbcXT3" alt=""><figcaption></figcaption></figure>
  * Right-click and select **New > User**.

    <figure><img src="/files/UtQoHCPvRNGPX0RxiygI" alt=""><figcaption></figcaption></figure>
  * Fill in the user details in the displayed dialog box and click **Next**.

    <figure><img src="/files/bAmcn5moE3hE4MZ2ZICe" alt=""><figcaption></figcaption></figure>
  * Set a password for the user and click **Next**.

    <figure><img src="/files/hUTsLB7x0JtGBldUvayK" alt=""><figcaption></figcaption></figure>
  * Review the details on the confirmation page and click **Finish**.

    <figure><img src="/files/6O6QjoFoeqf77XFgVnp0" alt=""><figcaption></figcaption></figure>
* Create a group.
  * Navigate to the **Builtindomain** folder.
  * If a group does not exist, create a new one by right-clicking and selecting **New > Group**.

    <figure><img src="/files/CMpzGP47H09PCeMQLZyu" alt=""><figcaption></figcaption></figure>
  * Enter the group details and click **OK**.<br>

    <figure><img src="/files/zWDSpIbclVCJUCElIJZD" alt=""><figcaption></figcaption></figure>
* Assign user to group.
  * Locate the newly created user, right-click, and select **Properties**.

    <figure><img src="/files/Ma4AxMOpkYyNMVBWz0Mp" alt=""><figcaption></figcaption></figure>
  * In the **General** tab, add the user's email address.

    <figure><img src="/files/YxqUmFXbWhv797dC1btk" alt=""><figcaption></figcaption></figure>
  * In the **MemberOf** tab, add the user to the appropriate group.

    <figure><img src="/files/X9vDGoGRtj8ONxnTq8aA" alt=""><figcaption></figcaption></figure>
  * Click **Apply** and **OK**.

    <figure><img src="/files/EuM7eLAfnk7fI7TtCz1G" alt=""><figcaption></figcaption></figure>

## *ADFS OIDC Flow Diagram*

<figure><img src="/files/LiPCycsLORQiV4LK0kif" alt=""><figcaption></figcaption></figure>

### **Create and Configure an ADFS Application Group**

Every native or web app OAuth client or web API resource configured with ADFS must be associated with an application group. Clients in an application group are configured to access resources within the same group. An application group can include multiple clients and resources.

* **Create an Application Group**
  * Open the ADFS Management Console.
  * Select **Application Groups** and click **Add Application Group**.
  * In the server application, provide a name for the application group, choose the template **Server application accessing a web API**, and click **Next**.

    <figure><img src="/files/NsLw570yv5dC7qi4Tvp4" alt=""><figcaption></figcaption></figure>
* **Add server application URL.**
  * Copy the Client Identifier for future reference.
  * Enter the redirect URL: `https://<Domain_Name>/oauth2/code/adfs` (replace `<Domain_Name>` with the OvalEdge application URL).

    <figure><img src="/files/6PCDWj4UzAo1nYAwWCyk" alt=""><figcaption></figcaption></figure>
* Copy identifiers and generate secrets.
  * In the **Configure Application Credentials** section, generate a shared client secret.
  * Click **Copy to clipboard** and save it securely.

    <figure><img src="/files/hSKBT3B5PGswnLlmc4iq" alt=""><figcaption></figcaption></figure>
* Configure client identifier.
  * Paste the previously copied client identifier.

    <figure><img src="/files/7xZlizcx8PjGP9fw4QdR" alt=""><figcaption></figcaption></figure>
* Choose an access control policy.

  <figure><img src="/files/EhNVjqwcYtoIo2TBqF0E" alt=""><figcaption></figcaption></figure>
* Configure application permissions.
  * Add the following scopes: `allatclaims`, `openid`, `profile`.

    <figure><img src="/files/NFu5pcsmgxtlG4rdgFxP" alt=""><figcaption></figcaption></figure>
  * Review the summary and click **Next**.

    <figure><img src="/files/Tgz4caIVbazHcQl4b7ny" alt=""><figcaption></figcaption></figure>
* **Add claims**
  * Double-click the newly created application group.

    <figure><img src="/files/OMdGu60bsLGZSlRhrWMk" alt=""><figcaption></figcaption></figure>
  * Edit the **OE\_API-Web API** configuration.

    <figure><img src="/files/KwCdIA7spvV0Un2RCUXJ" alt=""><figcaption></figcaption></figure>
  * Navigate to **Issuance Transform Rules** and click **Add Rule**.

    <figure><img src="/files/vmyChJPNYhQsNPlzuDhk" alt=""><figcaption></figcaption></figure>
  * In the wizard, select **Send LDAP Attributes as Claims** and click **Next**.

    <figure><img src="/files/tBGI6Hg2akdpceUX3EIG" alt=""><figcaption></figcaption></figure>
  * Click **Finish**.

    <figure><img src="/files/LEFdxmhYExPc1U0PmJ0p" alt=""><figcaption></figcaption></figure>
  * In the **Edit Rule – OvalEdge Claims** window, configure the claim rule name:
    * Attribute Store: **Active Directory**.
    * Map LDAP attributes to outgoing claim types (e.g., Email Address, Given Name).
  * Click **OK** to save changes.

    <figure><img src="/files/YGnZU3t2Oja3e6oA8LlO" alt=""><figcaption></figcaption></figure>

### **Configure the OvalEdge Application Server**

* Edit `oasis.properties`.
  * Navigate to the `oasis.properties` file located in the `extprop` folder.
  * Update the following properties:

    ```properties
    # OAuth2 Client ID
    spring.security.oauth2.client.registration.client-id=<CLIENT_IDENTIFIER>  

    # OAuth2 Client Secret
    spring.security.oauth2.client.registration.client-secret=<CLIENT_SECRET>  

    # OAuth2 Provider
    spring.security.oauth2.client.registration.provider=ADFS  

    # OAuth2 Base URL
    spring.security.oauth2.base-url=<ADFS_ISSUER_URL>  
    # Example: https://{ADFS_HOST_NAME}/adfs/.well-known/openid-configuration  

    # OAuth2 Scopes
    spring.security.oauth2.client.registration.scopes=openid,profile,email  

    # OAuth2 User Attribute Mapping
    spring.security.oauth2.client.registration.name-attribute=upn

    # Set the user attribute 
    spring.security.oauth2.client.registration.name.attribute=upn

    ```
* Edit `setenv.sh`.
  * Navigate to the Tomcat **bin** directory and open `setenv.sh`.
  * If `CATALINA_OPTS` already exists, append this parameter inside the double quotes:

    ```bash
    -DOVALEDGE_SECURITY_TYPE=oauth2
    ```
  * Example:

    ```bash
    export CATALINA_OPTS="-DOVALEDGE_SECURITY_TYPE=oauth2"
    ```
* Restart the Tomcat application.

  ```bash
  sudo systemctl restart tomcatui
  sudo systemctl restart tomcatjob
  ```

**Verify Configuration**

* Wait for 2 minutes after restarting the Tomcat services.
* Open the OvalEdge application.
* Verify that the login page includes the option **Continue with ADFS**.

  <figure><img src="/files/m4g6ReaTPNxw726ZklMu" alt=""><figcaption></figcaption></figure>
* Test the login functionality to ensure it works as expected.

***

Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ovaledge.com/deployment-and-maintenance/authentication-setup/adfs-with-oidc-support.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
