> This page is for MVS Auth.

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

# Register SSO Provider

POST https://c-auth.mvscloud.com/api/auth/sso/register
Content-Type: application/json

This endpoint is used to register an OIDC provider. This is used to configure the provider and link it to an organization

Reference: https://docs.mvscloud.com/mvs-auth/central-auth-api/sso/register-sso-provider

## Authentication

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

## Request

### Body (application/json)

This endpoint expects an object.

- `providerId` (string, required) — The ID of the provider. This is used to identify the provider during login and callback
- `issuer` (string, required) — The issuer URL of the provider
- `domain` (string, required) — The domain(s) of the provider. For enterprise multi-domain SSO where a single IdP serves multiple email domains, use comma-separated values (e.g., 'company.com,subsidiary.com,acquired-company.com')
- `oidcConfig` (SsoRegisterPostRequestBodyContentApplicationJsonSchemaOidcConfig, optional, nullable)
- `samlConfig` (SsoRegisterPostRequestBodyContentApplicationJsonSchemaSamlConfig, optional, nullable)
- `organizationId` (string, optional, nullable) — If organization plugin is enabled, the organization id to link the provider to
- `overrideUserInfo` (boolean, optional, nullable, default: false) — Override user info with the provider info. Defaults to false

## Response

### 200

OIDC provider created successfully

- `issuer` (string, required) — The issuer URL of the provider
- `domain` (string, required) — The domain of the provider, used for email matching
- `oidcConfig` (SsoRegisterPostResponsesContentApplicationJsonSchemaOidcConfig, required) — OIDC configuration for the provider
- `userId` (string, required) — ID of the user who registered the provider
- `providerId` (string, required) — Unique identifier for the provider
- `redirectURI` (string, required) — The redirect URI for the provider callback
- `domainVerified` (boolean, optional) — A boolean indicating whether the domain has been verified or not
- `domainVerificationToken` (string, optional) — Domain verification token. It can be used to prove ownership over the SSO domain
- `organizationId` (string, optional, nullable) — ID of the linked organization, if any

## Errors

### 400 Bad Request Error

Bad Request. Usually due to missing parameters, or invalid parameters.

- `message` (string, required)

### 401 Unauthorized Error

Unauthorized. Due to missing or invalid authentication.

- `message` (string, required)

### 403 Forbidden Error

Forbidden. You do not have permission to access this resource or to perform this action.

- `message` (string, optional)

### 404 Not Found Error

Not Found. The requested resource was not found.

- `message` (string, optional)

### 429 Too Many Requests Error

Too Many Requests. You have exceeded the rate limit. Try again later.

- `message` (string, optional)

### 500 Internal Server Error

Internal Server Error. This is a problem with the server that you cannot fix.

- `message` (string, optional)

## Types

### SsoRegisterPostRequestBodyContentApplicationJsonSchemaOidcConfig

- `clientId` (string, required) — The client ID
- `clientSecret` (string, optional, nullable) — The client secret. Required for client_secret_basic/client_secret_post. Optional for private_key_jwt.
- `authorizationEndpoint` (string, optional, nullable) — The authorization endpoint
- `tokenEndpoint` (string, optional, nullable) — The token endpoint
- `userInfoEndpoint` (string, optional, nullable) — The user info endpoint
- `tokenEndpointAuthentication` (string, optional, nullable)
- `privateKeyId` (string, optional, nullable)
- `privateKeyAlgorithm` (string, optional, nullable)
- `jwksEndpoint` (string, optional, nullable) — The JWKS endpoint
- `discoveryEndpoint` (string, optional, nullable)
- `skipDiscovery` (boolean, optional, nullable) — Skip OIDC discovery during registration. When true, you must provide authorizationEndpoint, tokenEndpoint, and jwksEndpoint manually.
- `scopes` (list of any, optional, nullable) — The scopes to request. Defaults to ['openid', 'email', 'profile', 'offline_access']
- `pkce` (boolean, optional, nullable, default: true) — Whether to use PKCE for the authorization flow
- `overrideUserInfo` (boolean, optional, nullable)
- `mapping` (SsoRegisterPostRequestBodyContentApplicationJsonSchemaOidcConfigMapping, optional, nullable)

### SsoRegisterPostRequestBodyContentApplicationJsonSchemaSamlConfig

- `entryPoint` (string, required) — The IdP SSO URL (entry point)
- `cert` (string, optional, nullable) — IdP signing certificate(s). Pass a single PEM string or an array for rolling rotation. Omit when `idpMetadata.metadata` XML carries the certs. When both this and `idpMetadata.cert` are set, `idpMetadata.cert` wins.
- `audience` (string, optional, nullable)
- `idpMetadata` (SsoRegisterPostRequestBodyContentApplicationJsonSchemaSamlConfigIdpMetadata, optional, nullable)
- `spMetadata` (SsoRegisterPostRequestBodyContentApplicationJsonSchemaSamlConfigSpMetadata, optional, nullable)
- `wantAssertionsSigned` (boolean, optional, nullable)
- `authnRequestsSigned` (boolean, optional, nullable)
- `signatureAlgorithm` (string, optional, nullable)
- `digestAlgorithm` (string, optional, nullable)
- `identifierFormat` (string, optional, nullable)
- `privateKey` (string, optional, nullable)
- `mapping` (SsoRegisterPostRequestBodyContentApplicationJsonSchemaSamlConfigMapping, optional, nullable)

### SsoRegisterPostResponsesContentApplicationJsonSchemaOidcConfig

OIDC configuration for the provider

- `issuer` (string, required) — The issuer URL of the provider
- `pkce` (boolean, required) — Whether PKCE is enabled for the authorization flow
- `clientId` (string, required) — The client ID for the provider
- `clientSecret` (string, required) — The client secret for the provider
- `discoveryEndpoint` (string, required) — The discovery endpoint URL
- `authorizationEndpoint` (string, optional, nullable) — The authorization endpoint URL
- `userInfoEndpoint` (string, optional, nullable) — The user info endpoint URL
- `scopes` (list of string, optional, nullable) — The scopes requested from the provider
- `tokenEndpoint` (string, optional, nullable) — The token endpoint URL
- `tokenEndpointAuthentication` (enum, optional, nullable) — Authentication method for the token endpoint
  - Allowed values: `client_secret_post`, `client_secret_basic`
- `jwksEndpoint` (string, optional, nullable) — The JWKS endpoint URL
- `mapping` (SsoRegisterPostResponsesContentApplicationJsonSchemaOidcConfigMapping, optional, nullable)

### SsoRegisterPostRequestBodyContentApplicationJsonSchemaOidcConfigMapping

- `id` (string, required) — Field mapping for user ID (defaults to 'sub')
- `email` (string, required) — Field mapping for email (defaults to 'email')
- `name` (string, required) — Field mapping for name (defaults to 'name')
- `emailVerified` (string, optional, nullable) — Field mapping for email verification (defaults to 'email_verified')
- `image` (string, optional, nullable) — Field mapping for image (defaults to 'picture')
- `extraFields` (map from string to any, optional, nullable)

### SsoRegisterPostRequestBodyContentApplicationJsonSchemaSamlConfigIdpMetadata

- `metadata` (string, optional, nullable)
- `entityID` (string, optional, nullable)
- `cert` (string, optional, nullable) — IdP signing certificate(s). Pass a single PEM string or an array for rolling rotation. Takes precedence over the top-level `cert`.
- `privateKey` (string, optional, nullable)
- `privateKeyPass` (string, optional, nullable)
- `isAssertionEncrypted` (boolean, optional, nullable)
- `encPrivateKey` (string, optional, nullable)
- `encPrivateKeyPass` (string, optional, nullable)
- `singleSignOnService` (list of any, optional, nullable) — Single Sign-On service configuration
- `singleLogoutService` (list of any, optional, nullable)

### SsoRegisterPostRequestBodyContentApplicationJsonSchemaSamlConfigSpMetadata

- `metadata` (string, optional, nullable)
- `entityID` (string, optional, nullable)
- `binding` (string, optional, nullable)
- `privateKey` (string, optional, nullable)
- `privateKeyPass` (string, optional, nullable)
- `isAssertionEncrypted` (boolean, optional, nullable)
- `encPrivateKey` (string, optional, nullable)
- `encPrivateKeyPass` (string, optional, nullable)

### SsoRegisterPostRequestBodyContentApplicationJsonSchemaSamlConfigMapping

- `id` (string, required) — Field mapping for user ID (defaults to 'nameID')
- `email` (string, required) — Field mapping for email (defaults to 'email')
- `name` (string, required) — Field mapping for name (defaults to 'displayName')
- `emailVerified` (string, optional, nullable) — Field mapping for email verification
- `firstName` (string, optional, nullable) — Field mapping for first name (defaults to 'givenName')
- `lastName` (string, optional, nullable) — Field mapping for last name (defaults to 'surname')
- `extraFields` (map from string to any, optional, nullable)

### SsoRegisterPostResponsesContentApplicationJsonSchemaOidcConfigMapping

- `id` (string, required) — Field mapping for user ID (defaults to 'sub')
- `email` (string, required) — Field mapping for email (defaults to 'email')
- `name` (string, required) — Field mapping for name (defaults to 'name')
- `emailVerified` (string, optional, nullable) — Field mapping for email verification (defaults to 'email_verified')
- `image` (string, optional, nullable) — Field mapping for image (defaults to 'picture')
- `extraFields` (map from string to string, optional, nullable) — Additional field mappings

## Examples

**Request**

```json
{
  "providerId": "string",
  "issuer": "string",
  "domain": "string"
}
```

**Response**

```json
{
  "issuer": "string",
  "domain": "string",
  "oidcConfig": {
    "issuer": "string",
    "pkce": true,
    "clientId": "string",
    "clientSecret": "string",
    "discoveryEndpoint": "string",
    "authorizationEndpoint": "string",
    "userInfoEndpoint": "string",
    "scopes": [
      "string"
    ],
    "tokenEndpoint": "string",
    "tokenEndpointAuthentication": "client_secret_post",
    "jwksEndpoint": "string",
    "mapping": {
      "id": "string",
      "email": "string",
      "name": "string",
      "emailVerified": "string",
      "image": "string",
      "extraFields": {}
    }
  },
  "userId": "string",
  "providerId": "string",
  "redirectURI": "string",
  "domainVerified": true,
  "domainVerificationToken": "string",
  "organizationId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://c-auth.mvscloud.com/api/auth/sso/register"

payload = {
    "providerId": "string",
    "issuer": "string",
    "domain": "string"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://c-auth.mvscloud.com/api/auth/sso/register';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"providerId":"string","issuer":"string","domain":"string"}'
};

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

```go
package main

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

func main() {

	url := "https://c-auth.mvscloud.com/api/auth/sso/register"

	payload := strings.NewReader("{\n  \"providerId\": \"string\",\n  \"issuer\": \"string\",\n  \"domain\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://c-auth.mvscloud.com/api/auth/sso/register")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"providerId\": \"string\",\n  \"issuer\": \"string\",\n  \"domain\": \"string\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://c-auth.mvscloud.com/api/auth/sso/register")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"providerId\": \"string\",\n  \"issuer\": \"string\",\n  \"domain\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://c-auth.mvscloud.com/api/auth/sso/register', [
  'body' => '{
  "providerId": "string",
  "issuer": "string",
  "domain": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://c-auth.mvscloud.com/api/auth/sso/register");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"providerId\": \"string\",\n  \"issuer\": \"string\",\n  \"domain\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "providerId": "string",
  "issuer": "string",
  "domain": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://c-auth.mvscloud.com/api/auth/sso/register")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```