# SSO

Tie GitBook into your corporate identity management and authentication providers (like SAML or OAuth). This centralizes user authentication and improves security.

## The Subdomain object

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"components":{"schemas":{"Subdomain":{"type":"object","properties":{"object":{"type":"string","enum":["subdomain"]},"subdomain":{"type":"string","description":"The GitBook subdomain, for example \"my-company\" in \"my-company.gitbook.io\"","pattern":"^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$","minLength":3,"maxLength":32},"target":{"oneOf":[{"$ref":"#/components/schemas/OrganizationPointer"}]},"isActive":{"type":"boolean"}},"required":["object","subdomain","target","isActive"]},"OrganizationPointer":{"type":"object","properties":{"type":{"type":"string","enum":["organization"]},"organization":{"type":"string","description":"Unique identifier for the organization"}},"required":["type","organization"]}}}}
```

## List all SAML providers

> Lists SAML providers configured for the specified organization.<br>

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"sso","description":"Tie GitBook into your corporate identity management and authentication providers (like SAML or OAuth). This centralizes user authentication and improves security.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Subdomain\" grouped=\"false\" %}\n    The Subdomain object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"OrganizationSAMLProvider":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"saml-provider\"","enum":["saml-provider"]},"id":{"type":"string","description":"Unique identifier for the provider."},"label":{"$ref":"#/components/schemas/SAMLProviderLabel"},"ssoURL":{"$ref":"#/components/schemas/URL"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"},"certificate":{"$ref":"#/components/schemas/SAMLProviderCertificate"},"defaultTeam":{"$ref":"#/components/schemas/OrganizationTeam"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"createdAt":{"description":"Date at which the provider was created.","$ref":"#/components/schemas/Timestamp"},"status":{"$ref":"#/components/schemas/SAMLProviderStatus"},"service":{"description":"Metadata about the service provider.","properties":{"acsURL":{"type":"string","description":"Assertion Consumer Service (ACS) URL","format":"uri"},"startURL":{"type":"string","description":"Start URL for the Identity Provider","format":"uri"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"}},"required":["acsURL","startURL","entityID"]},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the SAML Provider in the API","format":"uri"}},"required":["location"]}},"required":["object","id","label","ssoURL","entityID","certificate","defaultRole","createdAt","status","service","urls"]},"SAMLProviderLabel":{"type":"string","minLength":1,"maxLength":30},"URL":{"type":"string","format":"uri","maxLength":2048},"SAMLProviderEntityID":{"type":"string","maxLength":1024},"SAMLProviderCertificate":{"type":"string","maxLength":10000},"OrganizationTeam":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"team\"","enum":["team"]},"id":{"type":"string","description":"Unique identifier for the team."},"title":{"$ref":"#/components/schemas/OrganizationTeamTitle"},"members":{"type":"integer","description":"Count of members in this team."},"spaces":{"type":"number","description":"Count of spaces this team has access to."},"createdAt":{"description":"Date at which the team was created.","$ref":"#/components/schemas/Timestamp"},"permissions":{"type":"object","description":"The set of permissions for the team","properties":{"admin":{"type":"boolean","description":"Can the user manage the team"},"view":{"type":"boolean","description":"Can the user view the team and list its members"}},"required":["admin","view"]}},"required":["object","id","title","members","spaces","createdAt","permissions"]},"OrganizationTeamTitle":{"type":"string","description":"Title of the team","minLength":1,"maxLength":64},"Timestamp":{"type":"string","format":"date-time"},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"SAMLProviderStatus":{"type":"string","description":"Status of the provider.\n- `active`: The provider is active and can be used to authenticate users.\n- `pending`: The provider is pending and is not yet fully configured.\n","enum":["active","pending"]}}},"paths":{"/orgs/{organizationId}/saml":{"get":{"operationId":"listSAMLProvidersInOrganizationById","summary":"List all SAML providers","description":"Lists SAML providers configured for the specified organization.\n","tags":["sso"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationSAMLProvider"}}}}]}}}}}}}}}
```

## POST /orgs/{organizationId}/saml

> Create a new SAML provider

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"sso","description":"Tie GitBook into your corporate identity management and authentication providers (like SAML or OAuth). This centralizes user authentication and improves security.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Subdomain\" grouped=\"false\" %}\n    The Subdomain object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"SAMLProviderLabel":{"type":"string","minLength":1,"maxLength":30},"SAMLProviderEntityID":{"type":"string","maxLength":1024},"SAMLProviderCertificate":{"type":"string","maxLength":10000},"URL":{"type":"string","format":"uri","maxLength":2048},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationSAMLProvider":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"saml-provider\"","enum":["saml-provider"]},"id":{"type":"string","description":"Unique identifier for the provider."},"label":{"$ref":"#/components/schemas/SAMLProviderLabel"},"ssoURL":{"$ref":"#/components/schemas/URL"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"},"certificate":{"$ref":"#/components/schemas/SAMLProviderCertificate"},"defaultTeam":{"$ref":"#/components/schemas/OrganizationTeam"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"createdAt":{"description":"Date at which the provider was created.","$ref":"#/components/schemas/Timestamp"},"status":{"$ref":"#/components/schemas/SAMLProviderStatus"},"service":{"description":"Metadata about the service provider.","properties":{"acsURL":{"type":"string","description":"Assertion Consumer Service (ACS) URL","format":"uri"},"startURL":{"type":"string","description":"Start URL for the Identity Provider","format":"uri"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"}},"required":["acsURL","startURL","entityID"]},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the SAML Provider in the API","format":"uri"}},"required":["location"]}},"required":["object","id","label","ssoURL","entityID","certificate","defaultRole","createdAt","status","service","urls"]},"OrganizationTeam":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"team\"","enum":["team"]},"id":{"type":"string","description":"Unique identifier for the team."},"title":{"$ref":"#/components/schemas/OrganizationTeamTitle"},"members":{"type":"integer","description":"Count of members in this team."},"spaces":{"type":"number","description":"Count of spaces this team has access to."},"createdAt":{"description":"Date at which the team was created.","$ref":"#/components/schemas/Timestamp"},"permissions":{"type":"object","description":"The set of permissions for the team","properties":{"admin":{"type":"boolean","description":"Can the user manage the team"},"view":{"type":"boolean","description":"Can the user view the team and list its members"}},"required":["admin","view"]}},"required":["object","id","title","members","spaces","createdAt","permissions"]},"OrganizationTeamTitle":{"type":"string","description":"Title of the team","minLength":1,"maxLength":64},"Timestamp":{"type":"string","format":"date-time"},"SAMLProviderStatus":{"type":"string","description":"Status of the provider.\n- `active`: The provider is active and can be used to authenticate users.\n- `pending`: The provider is pending and is not yet fully configured.\n","enum":["active","pending"]}}},"paths":{"/orgs/{organizationId}/saml":{"post":{"operationId":"createOrganizationSAMLProvider","summary":"Create a new SAML provider","tags":["sso"],"parameters":[{"$ref":"#/components/parameters/organizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"$ref":"#/components/schemas/SAMLProviderLabel"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"},"certificate":{"$ref":"#/components/schemas/SAMLProviderCertificate"},"ssoURL":{"$ref":"#/components/schemas/URL"},"defaultTeam":{"type":"string"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"}},"required":["label"]}}}},"responses":{"201":{"description":"SAML Provider created","headers":{"Location":{"description":"API URL for the newly created SAML Provider","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSAMLProvider"}}}}}}}}}
```

## GET /orgs/{organizationId}/saml/{samlProviderId}

> Get a SAML provider by its ID

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"sso","description":"Tie GitBook into your corporate identity management and authentication providers (like SAML or OAuth). This centralizes user authentication and improves security.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Subdomain\" grouped=\"false\" %}\n    The Subdomain object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"samlProviderId":{"name":"samlProviderId","in":"path","required":true,"description":"The unique id of the SAML provider","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"OrganizationSAMLProvider":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"saml-provider\"","enum":["saml-provider"]},"id":{"type":"string","description":"Unique identifier for the provider."},"label":{"$ref":"#/components/schemas/SAMLProviderLabel"},"ssoURL":{"$ref":"#/components/schemas/URL"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"},"certificate":{"$ref":"#/components/schemas/SAMLProviderCertificate"},"defaultTeam":{"$ref":"#/components/schemas/OrganizationTeam"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"createdAt":{"description":"Date at which the provider was created.","$ref":"#/components/schemas/Timestamp"},"status":{"$ref":"#/components/schemas/SAMLProviderStatus"},"service":{"description":"Metadata about the service provider.","properties":{"acsURL":{"type":"string","description":"Assertion Consumer Service (ACS) URL","format":"uri"},"startURL":{"type":"string","description":"Start URL for the Identity Provider","format":"uri"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"}},"required":["acsURL","startURL","entityID"]},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the SAML Provider in the API","format":"uri"}},"required":["location"]}},"required":["object","id","label","ssoURL","entityID","certificate","defaultRole","createdAt","status","service","urls"]},"SAMLProviderLabel":{"type":"string","minLength":1,"maxLength":30},"URL":{"type":"string","format":"uri","maxLength":2048},"SAMLProviderEntityID":{"type":"string","maxLength":1024},"SAMLProviderCertificate":{"type":"string","maxLength":10000},"OrganizationTeam":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"team\"","enum":["team"]},"id":{"type":"string","description":"Unique identifier for the team."},"title":{"$ref":"#/components/schemas/OrganizationTeamTitle"},"members":{"type":"integer","description":"Count of members in this team."},"spaces":{"type":"number","description":"Count of spaces this team has access to."},"createdAt":{"description":"Date at which the team was created.","$ref":"#/components/schemas/Timestamp"},"permissions":{"type":"object","description":"The set of permissions for the team","properties":{"admin":{"type":"boolean","description":"Can the user manage the team"},"view":{"type":"boolean","description":"Can the user view the team and list its members"}},"required":["admin","view"]}},"required":["object","id","title","members","spaces","createdAt","permissions"]},"OrganizationTeamTitle":{"type":"string","description":"Title of the team","minLength":1,"maxLength":64},"Timestamp":{"type":"string","format":"date-time"},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"SAMLProviderStatus":{"type":"string","description":"Status of the provider.\n- `active`: The provider is active and can be used to authenticate users.\n- `pending`: The provider is pending and is not yet fully configured.\n","enum":["active","pending"]}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/orgs/{organizationId}/saml/{samlProviderId}":{"get":{"operationId":"getOrganizationSAMLProviderById","summary":"Get a SAML provider by its ID","tags":["sso"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/samlProviderId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSAMLProvider"}}}},"404":{"description":"No matching provider found","$ref":"#/components/responses/NotFoundError"}}}}}}
```

## DELETE /orgs/{organizationId}/saml/{samlProviderId}

> Delete a SAML provider

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"sso","description":"Tie GitBook into your corporate identity management and authentication providers (like SAML or OAuth). This centralizes user authentication and improves security.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Subdomain\" grouped=\"false\" %}\n    The Subdomain object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"samlProviderId":{"name":"samlProviderId","in":"path","required":true,"description":"The unique id of the SAML provider","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"}}},"paths":{"/orgs/{organizationId}/saml/{samlProviderId}":{"delete":{"operationId":"deleteOrganizationSAMLProvider","summary":"Delete a SAML provider","tags":["sso"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/samlProviderId"}],"responses":{"204":{"description":"SAML provider did not exist"},"205":{"description":"SAML provider has been deleted"}}}}}}
```

## PATCH /orgs/{organizationId}/saml/{samlProviderId}

> Update a SAML provider

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"sso","description":"Tie GitBook into your corporate identity management and authentication providers (like SAML or OAuth). This centralizes user authentication and improves security.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Subdomain\" grouped=\"false\" %}\n    The Subdomain object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"samlProviderId":{"name":"samlProviderId","in":"path","required":true,"description":"The unique id of the SAML provider","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"SAMLProviderLabel":{"type":"string","minLength":1,"maxLength":30},"SAMLProviderEntityID":{"type":"string","maxLength":1024},"SAMLProviderCertificate":{"type":"string","maxLength":10000},"URL":{"type":"string","format":"uri","maxLength":2048},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationSAMLProvider":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"saml-provider\"","enum":["saml-provider"]},"id":{"type":"string","description":"Unique identifier for the provider."},"label":{"$ref":"#/components/schemas/SAMLProviderLabel"},"ssoURL":{"$ref":"#/components/schemas/URL"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"},"certificate":{"$ref":"#/components/schemas/SAMLProviderCertificate"},"defaultTeam":{"$ref":"#/components/schemas/OrganizationTeam"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"createdAt":{"description":"Date at which the provider was created.","$ref":"#/components/schemas/Timestamp"},"status":{"$ref":"#/components/schemas/SAMLProviderStatus"},"service":{"description":"Metadata about the service provider.","properties":{"acsURL":{"type":"string","description":"Assertion Consumer Service (ACS) URL","format":"uri"},"startURL":{"type":"string","description":"Start URL for the Identity Provider","format":"uri"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"}},"required":["acsURL","startURL","entityID"]},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the SAML Provider in the API","format":"uri"}},"required":["location"]}},"required":["object","id","label","ssoURL","entityID","certificate","defaultRole","createdAt","status","service","urls"]},"OrganizationTeam":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"team\"","enum":["team"]},"id":{"type":"string","description":"Unique identifier for the team."},"title":{"$ref":"#/components/schemas/OrganizationTeamTitle"},"members":{"type":"integer","description":"Count of members in this team."},"spaces":{"type":"number","description":"Count of spaces this team has access to."},"createdAt":{"description":"Date at which the team was created.","$ref":"#/components/schemas/Timestamp"},"permissions":{"type":"object","description":"The set of permissions for the team","properties":{"admin":{"type":"boolean","description":"Can the user manage the team"},"view":{"type":"boolean","description":"Can the user view the team and list its members"}},"required":["admin","view"]}},"required":["object","id","title","members","spaces","createdAt","permissions"]},"OrganizationTeamTitle":{"type":"string","description":"Title of the team","minLength":1,"maxLength":64},"Timestamp":{"type":"string","format":"date-time"},"SAMLProviderStatus":{"type":"string","description":"Status of the provider.\n- `active`: The provider is active and can be used to authenticate users.\n- `pending`: The provider is pending and is not yet fully configured.\n","enum":["active","pending"]}}},"paths":{"/orgs/{organizationId}/saml/{samlProviderId}":{"patch":{"operationId":"updateOrganizationSAMLProvider","summary":"Update a SAML provider","tags":["sso"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/samlProviderId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"$ref":"#/components/schemas/SAMLProviderLabel"},"entityID":{"$ref":"#/components/schemas/SAMLProviderEntityID"},"certificate":{"$ref":"#/components/schemas/SAMLProviderCertificate"},"ssoURL":{"$ref":"#/components/schemas/URL"},"defaultTeam":{"type":"string"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"}}}}}},"responses":{"200":{"description":"SAML provider has been updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSAMLProvider"}}}}}}}}}
```

## GET /orgs/{organizationId}/sso

> List all SSO provider login infos

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"sso","description":"Tie GitBook into your corporate identity management and authentication providers (like SAML or OAuth). This centralizes user authentication and improves security.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Subdomain\" grouped=\"false\" %}\n    The Subdomain object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"OrganizationSSOProviderLogin":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the provider."},"label":{"$ref":"#/components/schemas/SAMLProviderLabel"},"startURL":{"type":"string","description":"The starting login URL for the Identity Provider","format":"uri"}},"required":["id","label","startURL"]},"SAMLProviderLabel":{"type":"string","minLength":1,"maxLength":30}}},"paths":{"/orgs/{organizationId}/sso":{"get":{"operationId":"listSSOProviderLoginsInOrganization","summary":"List all SSO provider login infos","tags":["sso"],"parameters":[{"$ref":"#/components/parameters/organizationId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationSSOProviderLogin"}}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.com/docs/developers/gitbook-api/api-reference/sso.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
