> This page is for Self-Hosted, version v3.0 (default).
> For other versions, use one of these documentation indexes:
> - v3.0 (default): https://docs.nvidia.com/run-ai/self-hosted/v3.0/llms.txt
> - v2.26: https://docs.nvidia.com/run-ai/self-hosted/v2.26/llms.txt
> - v2.25: https://docs.nvidia.com/run-ai/self-hosted/v2.25/llms.txt
> - v2.24: https://docs.nvidia.com/run-ai/self-hosted/v2.24/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/run-ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/run-ai/_mcp/server.

# Get external idps list

GET http://localhost:8080/api/v1/idps

Reference: https://docs.nvidia.com/run-ai/self-hosted/reference/rest-api/endpoints/authentication-and-authorization/idps/get-idps

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication

## Response

### 200

Executed successfully.

- `list of Idp`

## Errors

### 401 Unauthorized Error

Unauthorized

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 403 Forbidden Error

Forbidden

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 500 Internal Server Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 503 Service Unavailable Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

## Types

### Idp

- `alias` (string, required)
- `type` (enum, required)
  - Allowed values: `saml`, `oidc`, `openshift-v4`
- `redirectUri` (string, required)
- `samlData` (SamlData, optional)
- `oidcData` (OidcData, optional)
- `ocpData` (OcpData, optional)
- `mappers` (Mappers, optional)

### SamlData

- `signingCertificate` (string, optional)
- `singleSignOnServiceUrl` (string, optional)
- `entityId` (string, optional)
- `serviceProviderMetadataUrl` (string, optional) — Service Provider (SP) metadata url

### OidcData

- `clientId` (string, required)
- `clientSecret` (string, required)
- `scopes` (list of string, optional)
- `mandatoryClaim` (MandatoryClaim, optional)

### OcpData

- `idpBaseUrl` (string, optional)
- `clientId` (string, optional)
- `clientSecret` (string, optional)
- `scopes` (list of string, optional)

### Mappers

- `gid` (string, optional)
- `uid` (string, optional)
- `groups` (string, optional)
- `supplementaryGroups` (string, optional)
- `email` (string, optional)
- `firstName` (string, optional)
- `lastName` (string, optional)

### MandatoryClaim

- `claim` (string, required)
- `values` (list of string, required)

## Examples

### saml

**Response**

```json
[
  {
    "alias": "saml",
    "type": "saml",
    "redirectUri": "https://domain/auth/realms/name/broker/saml/endpoint",
    "samlData": {
      "signingCertificate": "signingCertificateExample",
      "singleSignOnServiceUrl": "https://authhost/protocol/saml",
      "entityId": "example.run.ai/runai",
      "serviceProviderMetadataUrl": "https://example.runai.com/auth/realms/runai/broker/saml/endpoint/descriptor"
    },
    "mappers": {
      "gid": "GID",
      "uid": "UID",
      "groups": "GROUPS",
      "supplementaryGroups": "SUPPLEMENTARYGROUPS",
      "email": "email"
    }
  }
]
```

**SDK Code**

```python saml
import requests

url = "http://localhost:8080/api/v1/idps"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript saml
const url = 'http://localhost:8080/api/v1/idps';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go saml
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/idps"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby saml
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/idps")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java saml
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/idps")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php saml
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8080/api/v1/idps', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp saml
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/idps");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift saml
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/idps")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### oidc

**Response**

```json
[
  {
    "alias": "oidc",
    "type": "oidc",
    "redirectUri": "https://domain/auth/realms/name/broker/oidc/endpoint",
    "oidcData": {
      "clientId": "my-client-id",
      "clientSecret": "*******",
      "scopes": [
        "scope1",
        "scope2"
      ],
      "mandatoryClaim": {
        "claim": "my-claim",
        "values": [
          "val1",
          "val2"
        ]
      }
    },
    "mappers": {
      "gid": "GID",
      "uid": "UID",
      "groups": "GROUPS",
      "supplementaryGroups": "SUPPLEMENTARYGROUPS",
      "email": "email"
    }
  }
]
```

**SDK Code**

```python oidc
import requests

url = "http://localhost:8080/api/v1/idps"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript oidc
const url = 'http://localhost:8080/api/v1/idps';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go oidc
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/idps"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby oidc
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/idps")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java oidc
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/idps")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php oidc
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8080/api/v1/idps', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp oidc
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/idps");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift oidc
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/idps")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### openshift-v4

**Response**

```json
[
  {
    "alias": "openshift-v4",
    "type": "openshift-v4",
    "redirectUri": "https://domain/auth/realms/name/broker/openshift-v4/endpoint",
    "ocpData": {
      "idpBaseUrl": "https://authhost/ocp",
      "clientId": "my-client-id",
      "clientSecret": "*******",
      "scopes": [
        "scope1",
        "scope2"
      ]
    },
    "mappers": {
      "gid": "metadata.gid",
      "uid": "metadata.uid",
      "groups": "groups",
      "supplementaryGroups": "supplementarygroups",
      "email": "metadata.name"
    }
  }
]
```

**SDK Code**

```python openshift-v4
import requests

url = "http://localhost:8080/api/v1/idps"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript openshift-v4
const url = 'http://localhost:8080/api/v1/idps';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go openshift-v4
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/idps"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby openshift-v4
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/idps")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java openshift-v4
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/idps")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php openshift-v4
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8080/api/v1/idps', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp openshift-v4
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/idps");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift openshift-v4
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/idps")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```