POST api/v2/admin/identityproviders

This method adds an identity provider for the account. The system will check the domain used to determine the identity provider is unique for the account. It will return the domain TXT string. To successfully verify this Identity provider this TXT string should be added to your domain.

Request Information

URI Parameters

None.

Body Parameters

Either xml or json request

TwoSms.CustomerPortalRole.API.Admin.SSO.BaseSSO
NameDescriptionTypeAdditional information
Name

Name of your SSO for this Identity Provider

string

Required

Provider

Name of the Provider

string

Required

LoginUrl

Log In URL

string

Required

LogoutUrl

Log Out URL

string

Required

Certificate

Security Certificate for the Provider

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Provider": "sample string 2",
  "LoginUrl": "sample string 3",
  "LogoutUrl": "sample string 4",
  "Certificate": "sample string 5"
}

application/xml, text/xml

Sample:
<BaseSSO xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Name>sample string 1</Name>
  <Provider>sample string 2</Provider>
  <LoginUrl>sample string 3</LoginUrl>
  <LogoutUrl>sample string 4</LogoutUrl>
  <Certificate>sample string 5</Certificate>
</BaseSSO>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'TwoSms.CustomerPortalRole.API.Admin.SSO.BaseSSO'.

Response Information

Resource Description

Returns the TXT record that should be placed on your domain

TwoSms.CustomerPortalRole.API.Misc.ResponseOfTwoSms.CustomerPortalRole.API.Admin.SSO.IdentityProviderDetails
NameDescriptionTypeAdditional information
Error

TwoSms.CustomerPortalRole.API.Misc.Error

None.

ResponseData

TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfTwoSms.CustomerPortalRole.API.Admin.SSO.IdentityProviderDetails

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": {
      "EntityID": "sample string 1",
      "ReplyURL": "sample string 2",
      "Domain": "sample string 3",
      "DomainTXTString": "sample string 4",
      "errorIDP": {
        "InvalidCert": true,
        "ProviderDup": true,
        "SignonUrl": true,
        "LogoutURL": true
      }
    }
  }
}

application/xml, text/xml

Sample:
<ResponseOfIdentityProviderDetails xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <ErrorCode>sample string 1</ErrorCode>
    <ErrorReason>sample string 2</ErrorReason>
  </Error>
  <ResponseData>
    <Result>sample string 1</Result>
    <Identification>
      <UserId>sample string 1</UserId>
    </Identification>
    <Detail>
      <Domain>sample string 3</Domain>
      <DomainTXTString>sample string 4</DomainTXTString>
      <errorIDP>
        <InvalidCert>true</InvalidCert>
        <ProviderDup>true</ProviderDup>
        <SignonUrl>true</SignonUrl>
        <LogoutURL>true</LogoutURL>
      </errorIDP>
      <EntityID>sample string 1</EntityID>
      <ReplyURL>sample string 2</ReplyURL>
    </Detail>
  </ResponseData>
</ResponseOfIdentityProviderDetails>