> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Keycloak Upgrade

With the release of Anaconda Enterprise 5.6, significant improvements have been made to our Keycloak implementation. For details, please see the [release notes](/docs/data-science/5.7.0/reference/release).

Upgrading to Anaconda Enterprise 5.6 requires Keycloak configuration changes to access your instance. You’ll need to add a service account with correct permissions to the `anaconda-platform` client, then add a protocol mapper to the `roles` client scope.

## Enabling the service account

After your upgrade to Anaconda Enterprise 5.6+ completes:

1. Open a browser and log in to your Keycloak admin panel using your existing Keycloak credentials. Your Keycloak admin panel can be found at `https://<FQDN>auth/admin` where `<FQDN>` is your Anaconda Enterprise fully qualified domain name.
2. Verify you are on the **anaconda-platform** realm.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_anaconda_platform_realm.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=b290d9899be8f0fc2836d9197d88a7c6" alt="" width="1922" height="946" data-path="images/data-science/kc_anaconda_platform_realm.png" />
</Frame>

3. Select **Clients** from the left-hand navigation, then select **anaconda-platform** from the list of available clients.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_clients_anaconda_platform.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=cc0327ea61bffc10919a3db7c118eb44" alt="" width="1922" height="866" data-path="images/data-science/kc_clients_anaconda_platform.png" />
   </Frame>
4. Select the **Service accounts roles** checkbox under **Capability config**, then save your changes.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_client_config_service_account_roles.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=cf1a01ed349e54de479fb5d6af688c27" alt="" width="1922" height="819" data-path="images/data-science/kc_client_config_service_account_roles.png" />
   </Frame>
5. Select the new **Service accounts roles** tab that appears at the top of the page.
6. Click **Assign role**.
   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_assign_service_account_roles.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=4a91af9e9ce8f2545d3b5d29ac24da44" alt="" width="1922" height="789" data-path="images/data-science/kc_assign_service_account_roles.png" />
   </Frame>
7. Open the filter dropdown menu and select **Filter by clients**.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_role_filter_options.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=a96bd6433e4edb9e4a3fab2672c0ff93" alt="" width="1922" height="915" data-path="images/data-science/kc_role_filter_options.png" />
   </Frame>
8. Search for the `view-users` role.
9. Select the role, then click **Assign**.
   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_assign_view_users_role.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=902d1dd936ead657f9fab50e6c147c5f" alt="" width="1922" height="836" data-path="images/data-science/kc_assign_view_users_role.png" />
   </Frame>

## Adding the protocol mapper

1. Select **Client scopes** from the left-hand navigation, then select **roles** from the list of available client scopes.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_roles_client_scope.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=e7dc076f5abdc8b5949caa54084d6562" alt="" width="1922" height="990" data-path="images/data-science/kc_roles_client_scope.png" />
</Frame>

2. Select the **Mappers** tab.
3. Open the **Add mapper** dropdown menu and select **By configuration**.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_add_protocol_mapper.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=07e0cd5f9a8448765117a75843b481d0" alt="" width="1922" height="792" data-path="images/data-science/kc_add_protocol_mapper.png" />
   </Frame>
4. Select **Audience**.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_audience_mapper.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=a316f72c953c8b7ee2a9278f6107acf9" alt="" width="1922" height="1061" data-path="images/data-science/kc_audience_mapper.png" />
   </Frame>
5. Complete the fields and set the toggle switches as indicated:

   * **Name**: my-audience
   * **Included Client Audience**: anaconda-platform
   * **Add to ID token**: `ON`
   * **Add to access token**: `ON`
6. Click **Save**.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/yg2lVfLe5JTI9sv-/images/data-science/kc_create_protocol_mapper.png?fit=max&auto=format&n=yg2lVfLe5JTI9sv-&q=85&s=f0a4b4627e8784bf9f62bff051cb21b2" alt="" width="1922" height="795" data-path="images/data-science/kc_create_protocol_mapper.png" />
</Frame>

Success! You can now log in to your instance from an existing account and use AE5 normally.
