# 2026-09-30 New feature: select external IdP using script

### The new feature

<p class="callout info">If there are **several external identity providers**, a **script** has been added to the external identity providers to **determine** whether they are **valid** for authentication.</p>

### Bear in mind

Please note the following points:

- If the **script** is **empty**, this logic is **ignored**.
- Only when the script returns "**false**" will this **identity provider** **not** be **displayed** in the list of options on the login screen.

### How to configure it?

The following **components** must be installed:

- Federation addon 4.0.41 (or higher)

### Let's look at an example

First of all, we have **several external IdPs**.

[![image.png](https://bookstack.soffid.com/uploads/images/gallery/2026-10/scaled-1680-/sF4ozn1KHSmv02dx-image.png)](https://bookstack.soffid.com/uploads/images/gallery/2026-10/sF4ozn1KHSmv02dx-image.png)

We can now see in Soffid IdP that authentication for **internal users** uses **external providers**.

[![image.png](https://bookstack.soffid.com/uploads/images/gallery/2026-10/scaled-1680-/Em8d1voWxX8xWpiQ-image.png)](https://bookstack.soffid.com/uploads/images/gallery/2026-10/Em8d1voWxX8xWpiQ-image.png)

When we try to log in, a list of **all** the **options** appears.

[![image.png](https://bookstack.soffid.com/uploads/images/gallery/2026-10/scaled-1680-/5YYk1qzqx1n12S1w-image.png)](https://bookstack.soffid.com/uploads/images/gallery/2026-10/5YYk1qzqx1n12S1w-image.png)

We have now decided that **one of the external IdPs is not valid for internal users**.

[![image.png](https://bookstack.soffid.com/uploads/images/gallery/2026-10/scaled-1680-/PrDgMwsneQ7YYm8B-image.png)](https://bookstack.soffid.com/uploads/images/gallery/2026-10/PrDgMwsneQ7YYm8B-image.png)

  
Now, when accessing an SP, it will **no longer appear** in the list.

[![image.png](https://bookstack.soffid.com/uploads/images/gallery/2026-10/scaled-1680-/yrn4aMi03HdmgjLU-image.png)](https://bookstack.soffid.com/uploads/images/gallery/2026-10/yrn4aMi03HdmgjLU-image.png)