SSO Strategies

An SSOStrategy is a way for users to sign in via another identity provider, such as Okta or Auth0.

It is rare that you will need to use API endpoints for managing these, and we recommend instead managing these via the web interface. Nevertheless, we share the API documentation here.

List SSO Strategies

SDK Method

ssostrategy.List()

Return Object

[]*SsoStrategy

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    sso_strategy "github.com/Files-com/files-sdk-go/v3/ssostrategy"
)

ssoStrategyIterator, err := sso_strategy.List(files_sdk.SsoStrategyListParams{})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

for ssoStrategyIterator.Next() {
    ssoStrategy := ssoStrategyIterator.ssoStrategy()
}
err = ssoStrategyIterator.Err()
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

Show SSO Strategy

SDK Method

ssostrategy.Find()

Return Object

SsoStrategy

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

SsoStrategyFindParams Fields

FieldDescription
Id
int64
Required
Sso Strategy ID.

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    sso_strategy "github.com/Files-com/files-sdk-go/v3/ssostrategy"
)

ssoStrategy, err := sso_strategy.Find(files_sdk.SsoStrategyFindParams{Id: 1})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

Synchronize provisioning data with the SSO remote server

SDK Method

ssostrategy.Sync()

Return Object

No return value.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

SsoStrategySyncParams Fields

FieldDescription
Id
int64
Required
Sso Strategy ID.

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    sso_strategy "github.com/Files-com/files-sdk-go/v3/ssostrategy"
)

err := sso_strategy.Sync(files_sdk.SsoStrategySyncParams{Id: 1})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

The SsoStrategy Object

Some of the methods above return a SsoStrategy object. The attributes of this object are listed below.

AttributeDescription
Protocol
string
SSO Protocol
Possible values: oauth2, saml, active_directory, open_ldap, scim
Provider
string
Provider name
Possible values: google, auth0, okta, azure, box, dropbox, slack, onelogin, saml, idaptive, ldap, scim, jumpcloud, duo
Label
string
Custom label for the SSO provider on the login page.
LogoUrl
string
URL holding a custom logo for the SSO provider on the login page.
Id
int64
ID
Enabled
boolean
Is strategy enabled? This may become automatically set to false after a high number and duration of failures.
UserCount
int64
Count of users with this SSO Strategy
SamlProviderCertFingerprint
string
Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
SamlProviderIssuerUrl
string
Identity provider issuer url
SamlProviderMetadataContent
string
Custom identity provider metadata
SamlProviderMetadataUrl
string
Metadata URL for the SAML identity provider
SamlProviderSloTargetUrl
string
Identity provider SLO endpoint
SamlProviderSsoTargetUrl
string
Identity provider SSO endpoint if saml_provider_metadata_url is not available.
ScimAuthenticationMethod
string
SCIM authentication type.
Possible values: none, basic, token
ScimUsername
string
SCIM username.
ScimOauthAccessToken
string
SCIM OAuth Access Token.
ScimOauthAccessTokenExpiresAt
string
SCIM OAuth Access Token Expiration Time.
Subdomain
string
Subdomain or domain name for your auth provider. Example: https://[subdomain].okta.com/
ProvisionUsers
boolean
Auto-provision users?
ProvisionGroups
boolean
Auto-provision group membership based on group memberships on the SSO side?
DeprovisionUsers
boolean
Auto-deprovision users?
DeprovisionGroups
boolean
Auto-deprovision group membership based on group memberships on the SSO side?
DeprovisionBehavior
string
Method used for deprovisioning users.
Possible values: disable, delete
ProvisionGroupDefault
string
Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
ProvisionGroupExclusion
string
Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
ProvisionGroupInclusion
string
Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
ProvisionGroupRequired
string
Comma or newline separated list of group names (with optional wildcards) to require membership for user provisioning.
ProvisionEmailSignupGroups
string
Comma-separated list of group names whose members will be created with email_signup authentication.
ProvisionReadonlySiteAdminGroups
string
Comma-separated list of group names whose members will be created as Read-Only Site Admins.
ProvisionSiteAdminGroups
string
Comma-separated list of group names whose members will be created as Site Admins.
ProvisionGroupAdminGroups
string
Comma-separated list of group names whose members will be provisioned as Group Admins.
ProvisionAttachmentsPermission
boolean
ProvisionDavPermission
boolean
Auto-provisioned users get WebDAV permission?
ProvisionFtpPermission
boolean
Auto-provisioned users get FTP permission?
ProvisionSftpPermission
boolean
Auto-provisioned users get SFTP permission?
ProvisionTimeZone
string
Default time zone for auto provisioned users.
ProvisionCompany
string
Default company for auto provisioned users.
ProvisionRequire2fa
string
2FA required setting for auto provisioned users. use_system_setting uses the site-wide setting, including SSO exemptions. always_require and never_require override the site-wide setting when user-level overrides are allowed.
Possible values: use_system_setting, always_require, never_require
ProvisionFilesystemLayout
string
File System layout to use for auto provisioned users.
Possible values: site_root, user_root, partner_root, integration_centric
ProviderIdentifier
string
URL-friendly, unique identifier for Azure SAML configuration
LdapBaseDn
string
Base DN for looking up users in LDAP server
LdapDomain
string
Domain name that will be appended to LDAP usernames
DisplayOnLoginPage
boolean
Should this strategy be displayed on the login page?
LdapHost
string
LDAP host
LdapHost2
string
LDAP backup host
LdapHost3
string
LDAP backup host
LdapPort
int64
LDAP port
LdapProvisioningEnabled
boolean
Use LDAP server settings for scheduled provisioning while using this SSO provider for authentication?
LdapSecure
boolean
Use secure LDAP?
LdapType
string
LDAP server type
Possible values: active_directory, open_ldap
LdapUsername
string
Username for signing in to LDAP server.
LdapUsernameField
string
LDAP username field
Possible values: sAMAccountName, userPrincipalName