# License Servers

Connect Zoom, JetBrains, or Tableau so that an access rule grants access by assigning a license, and removes it when access ends.

> **Info:** **Experimental.** Zoom, JetBrains, and Tableau carry an **Experimental** badge
> in the dashboard. Test a rule with a few users before you rely on it for
> production access.

A license server lets an [access rule](https://www.tryrisotto.com/docs/dashboard/applications/access-rules) assign a license with the provider when Risotto grants access. Risotto supports three license servers:

- **Zoom** sets the user's license type: **Licensed** or **Basic**.
- **JetBrains** assigns a license for one JetBrains product.
- **Tableau** sets the user's site role, which sets their license tier.

A rule can use a license server on its own, or together with an identity provider group, a script tool, or a manual grantor. Risotto assigns the license after it adds the user to the rule's group.

> **Note:** Org Admins and Org Managers can connect license servers and edit access rules.

## Connect a license server

You connect each provider once for your organization. Any access rule can then use it.

1. **Open the provider's page**

   Go to **Settings** > **Integrations**. Under **Identity**, click **Zoom**, **JetBrains**, or **Tableau**.

   *Product example: The Integrations page in the Risotto dashboard, with the Identity integrations and the Zoom card.*

2. **Click Connect**

   The card names the credentials that the provider needs: **Server-to-Server OAuth app** for Zoom, **API key** for JetBrains, or **Personal access token** for Tableau. Click **Connect**.

   *Product example: Zoom's integration page before it is connected, with the Server-to-Server OAuth app card and Connect.*

3. **Enter the credentials**

   In the **Connect Zoom** dialog (or **Connect JetBrains**, **Connect Tableau**), enter a **Display name**, for example *Northwind Zoom*. Access rules show this name when you select a license server. Then enter the provider's credentials. The dialog's **Instructions** pane shows where to find them, and the sections below describe each provider.

   *Product example: The Connect Zoom dialog in the Risotto dashboard, with the display name and credentials filled in, and Connect Zoom.*

4. **Save the connection**

   Click **Connect Zoom** (or **Connect JetBrains**, **Connect Tableau**). Risotto saves the credentials and tests the connection. When the test passes, Risotto shows "Northwind Zoom connected", and the card shows **Connected**.

   *Product example: Zoom's integration page once connected, with the Northwind Zoom connection card on the Connections tab.*

   When the test fails, Risotto still saves the credentials. It shows "Zoom added but connection test failed" with the provider's error, and the card shows **Error** and a **Connection error** notice. Fix the credentials with **Configure...** (see below).

The menu on the connection card (**Connected** or **Error**) has three actions:

- **Configure...** updates the credentials. Leave a field blank to keep its current value. Risotto tests the connection again when you click **Save changes**.
- **Rename...** changes the display name only.
- **Disconnect...** removes the credentials. Risotto stops assigning the provider's licenses, and you must update the access rules that use it.

**Connect** shows only while the provider has no connection, so you connect one set of credentials for each provider.

### Zoom

Risotto uses a **Server-to-Server OAuth** app to set Zoom license types.

1. **Create a Server-to-Server OAuth app**

   In the [Zoom App Marketplace](https://marketplace.zoom.us/develop/create), click **Develop** > **Build App** and choose **Server-to-Server OAuth**. Name the app, for example *Risotto*.

2. **Copy the app's credentials**

   On the **App Credentials** tab, copy the **Account ID**, **Client ID**, and **Client Secret**.

3. **Add the scopes**

   Under **Scopes**, add these three scopes:

   - `user:read:user:admin`
   - `user:read:list_users:admin`
   - `user:update:user:admin`

   > **Warning:** Zoom license provisioning fails if any of these scopes is missing. If you get a scope error after you connect, check the scopes first.

4. **Activate the app**

   On the **Activation** tab, activate the app.

5. **Enter the credentials in Risotto**

   In the **Connect Zoom** dialog, enter the **Account ID**, **Client ID**, and **Client secret**.

In an access rule, the Zoom license server has a **License Type**: **Licensed** or **Basic**. Risotto offers no other Zoom user types.

- The user must already exist in Zoom. Risotto does not create Zoom users.
- If the user already has the license type, Risotto changes nothing.
- When access ends, Risotto changes a **Licensed** user back to **Basic**.

### JetBrains

Risotto uses the JetBrains Account API to assign JetBrains licenses.

1. **Generate an API key**

   In the [JetBrains Account](https://account.jetbrains.com/team) portal, go to **Team Management** > **API Keys**. Generate an API key with **License Management** permissions.

2. **Copy the API key and customer code**

   Copy the **API Key**, and your **Customer Code** from the account page.

3. **Enter the credentials in Risotto**

   In the **Connect JetBrains** dialog, enter the **API Key** and **Customer Code**.

In an access rule, the JetBrains license server has a **Product Name**. Type the product name exactly as your JetBrains Account shows it on the licenses, for example `IntelliJ IDEA Ultimate`. Risotto compares the names without case, but the rest of the name must be the same. A license from a bundle, such as the All Products Pack, carries the bundle's name. A rule for one product in the bundle does not find that license.

Risotto assigns a license for that product that is free to assign, not outdated, and not suspended. If the user already has a license for the product, Risotto changes nothing.

Risotto cannot revoke JetBrains licenses. When access ends, Risotto adds an internal note to the ticket, **Manual action required**, that asks you to revoke the license in JetBrains Account. JetBrains allows this 30 days after the license was assigned. The connection card also says this.

### Tableau

Tableau has no separate license object: a user's **site role** sets both their access and their license tier. Granting access sets the site role; removing access sets it back to `Unlicensed`.

1. **Create a personal access token**

   In Tableau, go to **My Account Settings** > **Personal Access Tokens** and click **Create new token**. Name it, for example *Risotto*. The token's user must be a Site Administrator to change site roles.

2. **Copy the token**

   Copy the **Token Name** and **Token Secret**.

3. **Find your server and site**

   Note your **Server URL**, for example `https://prod-useast-b.online.tableau.com`, and your **Site Content URL**: the part after `/site/` in your Tableau URL.

4. **Enter the credentials in Risotto**

   In the **Connect Tableau** dialog, enter the **Server URL**, **Site Content URL**, **Token Name**, and **Token Secret**. Leave **Site Content URL** empty for the default site.

In an access rule, the Tableau license server has a **Site Role**: **Viewer**, **Explorer**, **Explorer (Can Publish)**, **Creator**, **Site Administrator Explorer**, or **Site Administrator Creator**. If the user is not on the site, Risotto adds them with that role.

> **Note:** If a site is at license capacity, Tableau can add a user as `Unlicensed`
> instead of the requested role. When Risotto adds a new user and this happens,
> the grant fails with "was created but assigned Unlicensed role (license
> capacity may be exhausted)". When Risotto changes the role of a user who is
> already on the site, it does not check the role that Tableau saved. If a grant
> doesn't seem to have taken effect, check the user's site role in Tableau.

> **Warning:** A connection manages one site: the one in **Site Content URL**. Site roles are
> separate for each site, so a user's role on another site does not change.

## Use a license server in an Access Rule

1. **Open the access rule**

   Go to **Settings** > **Applications** and open the application. Open the rule, or create one (see [Access Rules](https://www.tryrisotto.com/docs/dashboard/applications/access-rules)). Click **Edit**.

2. **Select the license server**

   In the **Access settings** card, find the **License Servers** card. In
   **Server**, select the connection by its display name. The card shows only
   when your organization has at least one license server. If you change the
   server, Risotto clears the setting under it.

3. **Choose what the rule assigns**

   Set the license type (Zoom), the product (JetBrains), or the site role (Tableau) that this rule grants. The field is **License Type**, **Product Name**, or **Site Role**.

   *Product example: An access rule's Access settings in edit mode, with the License Servers card on Northwind Zoom and License Type Licensed.*

   A Zoom rule can't be saved without a **License Type**.

4. **Save the rule**

   Click **Save**. When a request against this rule is approved, Risotto assigns the license.

The provider's page in **Settings** > **Integrations** has an **Access rules** tab. It lists every rule that grants the provider's licenses, with what each rule assigns. A rule that is turned off shows **Disabled**. Click a row to open the rule.

*Product example: Zoom's integration page on the Access rules tab, listing the rules that assign a Zoom license.*

## Troubleshooting

### Zoom: scope or permission errors on grant

Confirm that the Server-to-Server OAuth app in the Zoom App Marketplace has all three scopes (`user:read:user:admin`, `user:read:list_users:admin`, `user:update:user:admin`) and is activated. A missing scope is the most common cause of provisioning failures.

### Zoom: user not found in Zoom

The grant fails with "User ... not found in Zoom. The user must exist in Zoom
before a license can be assigned." Add the user in Zoom, then request access
again.

### JetBrains: connection test fails

Confirm that the API key has **License Management** permissions, and that the
API key and Customer Code are entered exactly as JetBrains Account shows them.
To change them, open the connection card's menu and click **Configure...**.

### JetBrains: No available JetBrains license found for product

Risotto found no license with that product name that is free to assign, not outdated, and not suspended. Check two things in your JetBrains Account:

- The product name on the licenses matches the **Product Name** in the access rule exactly. Bundle licenses carry the bundle's name.
- At least one license for that product is unassigned and not expired.

Risotto only assigns licenses you already have. Buy or renew licenses in JetBrains.

### JetBrains: license still assigned after access ends

Risotto cannot revoke JetBrains licenses. Revoke the license in JetBrains
Account. The ticket has an internal note, **Manual action required**, that
names the user. JetBrains allows revocation 30 days after the license was
assigned.

### Tableau: grant appears successful but the user still can't access Tableau

Check the user's site role in Tableau. If the site was at license capacity
when the grant ran, Tableau may have kept the user as `Unlicensed` instead of
the requested role.

### Zoom or Tableau: license still assigned after access is revoked

If the license server refuses to remove the license, Risotto completes the rest of the revocation and marks the access as revoked. Then it asks your org admins to remove the license by hand:

- An alert on the [Alerts](https://www.tryrisotto.com/docs/dashboard/alerts) page, and a message in your notifications channel, for example "Failed to revoke the 'Zoom Licensed' license for <priya.shah@northwind.com>. Please revoke it manually." The message names the access rule, and the alert includes the error from the provider.
- An internal note on the ticket: **License revocation failed**, with the same error.

Remove the license in Zoom or Tableau, then dismiss the alert. For Zoom, error `3412` means that your account has reached its maximum number of Basic users. Free a Basic seat first.

### Access rule fails with a configuration error

A license server rule needs both a connected license server and the setting for it: **License Type**, **Product Name**, or **Site Role**. If one is missing, or the provider refuses the grant, the grant fails and Risotto reports the error to your org admins rather than failing silently.

## Related

- [Access Rules](https://www.tryrisotto.com/docs/dashboard/applications/access-rules)
- [Access Grants](https://www.tryrisotto.com/docs/dashboard/applications/access-grants)
- [Applications](https://www.tryrisotto.com/docs/dashboard/applications)

Source: https://www.tryrisotto.com/docs/dashboard/applications/license-servers
