<@U04UQ68083H> In ory network, how to find the sso...
# ory-copilot
b
@chilly-king-10285 In ory network, how to find the sso provider(s) of a given B2B SSO Organization
b
A message from kapa.ai
To find the SSO provider(s) of a given B2B SSO Organization in Ory Network, you can follow these steps: 1. First, you need to retrieve the organization's ID. If you don't have it, you can list all organizations in your project using the API. 2. Once you have the organization ID, you can list all SSO connections for your project. The SSO connections that belong to your specific organization will have the
organization_id
field matching your organization's ID. Here's how to do it using the API: 1. List all SSO connections for your project:
Copy code
bash curl -X GET --location "<https://api.console.ory.sh/projects/$PROJECT_ID>" \      -H "Authorization: Bearer $WORKSPACE_API_KEY" \    | jq ".services.identity.config.selfservice.methods.oidc.config.providers"
2. In the response, look for providers that have the
organization_id
field matching your organization's ID. These are the SSO providers for your given B2B SSO Organization. The response will look something like this:
Copy code
json [   {     "client_id": "...",     "client_secret": "...",     "id": "ory-GPx1yPH4",     "issuer_url": "<https://example.org>",     "label": "My OIDC provider",     "mapper_url": "<https://storage.googleapis.com/bac-gcs-production/94292215dbabe405bebff988b5356663fcf5cba35b10fc6ca2cfea7bc7049e906e01d271a3daeb844203efdfbf2cff356274daa63d5afc2a379bbe93b8b40e63.jsonnet>",     "organization_id": "6bb1c7d1-3b3e-4995-9e09-35649dc45a2b",     "provider": "generic",     "scope": ["openid", "offline_access", "email"]   } ]
Each entry in this list with an
organization_id
matching your organization's ID is an SSO provider for that organization. Alternatively, you can use the Ory Console: 1. Go to AuthenticationEnterprise SSO in the [Ory Console](https://console.ory.sh/projects/current/authentication/organizations). 2. Find your organization in the list and click on it to view its details. 3. You should see a list of SSO connections configured for this organization. [Create SSO connections for an organization](https://www.ory.sh/docs/kratos/organizations#create-sso-connections-for-an-organization) Remember that you need appropriate permissions to access this information, typically requiring a workspace API key for API access or appropriate console access for using the Ory Console.