PingOne Platform APIs

Read all identity providers

GET {{apiPath}}/v1/environments/{{envID}}/identityProviders

The GET {{apiPath}}/v1/environments/{{envID}}/identityProviders endpoint returns a list of all identity provider resources for the specified environment resource.

This operation allows SCIM filtering on the name and id properties with the eq (equal) and co (contains) operators. For example, the following filter returns the identity provider resources whose name attribute value contains the string "demo idp":

https://api.pingone.com/v1/environments/{{envID}}/identityProviders?filter=name co "demo idp"

Here is the same filter with URL-encoding to account for spaces (%20) and quotation marks (%22):

https://api.pingone.com/v1/environments/{{envID}}/identityProviders?filter=name%20co%20%22demo%20idp%22

You can also filter on the id property. For example: GET {{apiPath}}/v1/environments/{{envID}}/identityProviders?filter=id eq "d7967045-5e28-48f4-98de-448be9517d1a" or GET {{apiPath}}/v1/environments/{{envID}}/identityProviders?filter=id co "5e28".

Query parameters
Query parameter Attributes (or allowed limits)

filter

  • name (eq, co)

  • id (eq, co)

Headers

Authorization      Bearer {{accessToken}}

Example request

  • cURL

  • C#

  • Go

  • HTTP

  • Java

  • jQuery

  • NodeJS

  • Python

  • PHP

  • Ruby

  • Swift

curl --location --globoff '{{apiPath}}/v1/environments/{{envID}}/identityProviders' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/v1/environments/{{envID}}/identityProviders")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer {{accessToken}}");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main

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

func main() {

  url := "{{apiPath}}/v1/environments/{{envID}}/identityProviders"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer {{accessToken}}")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
GET /v1/environments/{{envID}}/identityProviders HTTP/1.1
Host: {{apiPath}}
Authorization: Bearer {{accessToken}}
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("{{apiPath}}/v1/environments/{{envID}}/identityProviders")
  .method("GET", body)
  .addHeader("Authorization", "Bearer {{accessToken}}")
  .build();
Response response = client.newCall(request).execute();
var settings = {
  "url": "{{apiPath}}/v1/environments/{{envID}}/identityProviders",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {{accessToken}}"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
var request = require('request');
var options = {
  'method': 'GET',
  'url': '{{apiPath}}/v1/environments/{{envID}}/identityProviders',
  'headers': {
    'Authorization': 'Bearer {{accessToken}}'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
import requests

url = "{{apiPath}}/v1/environments/{{envID}}/identityProviders"

payload = {}
headers = {
  'Authorization': 'Bearer {{accessToken}}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{{apiPath}}/v1/environments/{{envID}}/identityProviders');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer {{accessToken}}'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
require "uri"
require "net/http"

url = URI("{{apiPath}}/v1/environments/{{envID}}/identityProviders")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {{accessToken}}"

response = http.request(request)
puts response.read_body
var request = URLRequest(url: URL(string: "{{apiPath}}/v1/environments/{{envID}}/identityProviders")!,timeoutInterval: Double.infinity)
request.addValue("Bearer {{accessToken}}", forHTTPHeaderField: "Authorization")

request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()

Example response

200 OK

{
    "_links": {
        "self": {
            "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders"
        }
    },
    "_embedded": {
        "identityProviders": [
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/09470346-7851-4d35-9cdf-4a2dfe39ac2d"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    },
                    "attributes": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/09470346-7851-4d35-9cdf-4a2dfe39ac2d/attributes"
                    }
                },
                "id": "09470346-7851-4d35-9cdf-4a2dfe39ac2d",
                "type": "FACEBOOK",
                "name": "FacebookIdP4",
                "description": "Custom Facebook ID Provider",
                "enabled": true,
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2019-05-31T19:52:55.020Z",
                "updatedAt": "2019-05-31T19:52:55.020Z",
                "appId": "FBID",
                "appSecret": "FBSecret"
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/172fc816-66ed-4d69-9bf9-98a11f96ff2a"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    },
                    "attributes": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/172fc816-66ed-4d69-9bf9-98a11f96ff2a/attributes"
                    }
                },
                "id": "172fc816-66ed-4d69-9bf9-98a11f96ff2a",
                "type": "LINKEDIN",
                "name": "LinkedInIdP",
                "description": "Custom LinkedIn ID Provider",
                "enabled": true,
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2019-12-06T23:08:09.136Z",
                "updatedAt": "2019-12-06T23:08:09.136Z",
                "clientId": "LINKEDIN_ID",
                "clientSecret": "LINKEDIN_SECRET"
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/a9e4e181-f520-4e6e-af30-d3559781ad1b"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    },
                    "attributes": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/a9e4e181-f520-4e6e-af30-d3559781ad1b/attributes"
                    }
                },
                "id": "a9e4e181-f520-4e6e-af30-d3559781ad1b",
                "type": "SAML",
                "name": "SAMLIdP",
                "description": "this is SAML IdP test",
                "enabled": false,
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2019-06-17T17:20:12.294Z",
                "updatedAt": "2019-06-17T17:20:12.294Z",
                "_embedded": {
                    "attributes": [
                        {
                            "name": "username",
                            "value": "${samlAssertion.subject}",
                            "update": "EMPTY_ONLY",
                            "id": "51a036c6-41ed-44f7-bd1d-eacaa2a1feab",
                            "mappingType": "CORE",
                            "environment": {
                                "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                            },
                            "identityProvider": {
                                "id": "a9e4e181-f520-4e6e-af30-d3559781ad1b"
                            },
                            "createdAt": "2019-06-17T17:20:12.294Z",
                            "updatedAt": "2019-06-17T17:20:12.294Z"
                        }
                    ]
                },
                "authnRequestSigned": false,
                "ssoEndpoint": "https://idp.com/sso",
                "ssoBinding": "HTTP_POST",
                "idpVerification": {
                    "certificates": [
                        {
                            "id": "123f67f8-c56c-4903-9c9b-c4b162e22789"
                        }
                    ]
                },
                "spEntityId": "sp-1560792011",
                "spSigning": {
                    "key": {
                        "id": "a65318d7-eaa2-4070-bb73-ffe21a6fca06"
                    }
                },
                "idpEntityId": "idp-1560792011"
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/65fb47be-c71e-45b6-9c4c-e3deed8df116"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    },
                    "attributes": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/65fb47be-c71e-45b6-9c4c-e3deed8df116/attributes"
                    }
                },
                "id": "65fb47be-c71e-45b6-9c4c-e3deed8df116",
                "type": "GOOGLE",
                "name": "GoogleIdP",
                "description": "Google identity provider.",
                "enabled": false,
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2019-06-17T18:03:45.785Z",
                "updatedAt": "2019-06-17T18:03:45.785Z",
                "clientSecret": "GoogleClientSecret",
                "clientId": "GoogleClientId"
            }
        ]
    },
    "size": 4
}