<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Get Routing Rules IDs via API
Single Sign-On
Okta Classic Engine
Okta Identity Engine
Overview

An admin may need to get information on the number of routing rules present or routing rule IDs.

Applies To
  • Routing Rule
  • External Identity Provider (IdP)
  • Application Programming Interface (API)
Solution

The steps below use POSTMAN to run API calls to get routing rule IDs. Before proceeding, please follow the steps to integrate POSTMAN with Okta.

OAuth 2.0 Scope needed:   okta.policies.read

There is currently no direct API call to get this information, but there are two different API GET calls that can be used:

  1. Get the policy ID with type=IDP_DISCOVERY
    {url}/api/v1/policies?type=IDP_DISCOVERY
    policy ID 

    NOTE:  Make sure to send the required scope for both request calls.  The request is to get the Policy ID, not the IdP's ID(s).

  1. Use the Policy ID from the above call and make another GET API call to get the routing rule IDs.
    {url}/api/v1/policies/{Policy ID}/rules
    GET API call to get the routing rule IDs 


The second call will provide all the routing rule IDs.

NOTE: If a value is not specified for the limit parameter when a list of results is requested, the maximum (200) is used as a default. Pagination is required to return more results than this limit.

 

Related References

Loading
How to Get Routing Rules IDs via API