Organization

interface Organization

The Organization interface provides methods for retrieving, updating, and deleting the current authenticated user's organization and creating, updating, deleting, reactivating, and searching an organizations members

Types

Link copied to clipboard
Link copied to clipboard
data class UpdateOrganizationParameters(val organizationName: String? = null, val organizationSlug: String? = null, val organizationLogoUrl: String? = null, val ssoDefaultConnectionId: String? = null, val ssoJitProvisioning: SsoJitProvisioning? = null, val ssoJitProvisioningAllowedConnections: List<String>? = null, val emailAllowedDomains: List<String>? = null, val emailJitProvisioning: EmailJitProvisioning? = null, val emailInvites: EmailInvites? = null, val authMethods: AuthMethods? = null, val allowedAuthMethods: List<AllowedAuthMethods>? = null, val mfaMethods: MfaMethods? = null, val allowedMfaMethods: List<MfaMethod>? = null, val mfaPolicy: MfaPolicy? = null, val rbacEmailImplicitRoleAssignments: List<String>? = null)

Data class used for wrapping parameters used for making an Organization update call

Properties

Link copied to clipboard

Public variable that exposes an instance of Organization.Members

Link copied to clipboard
abstract val onChange: StateFlow<OrganizationData?>

Exposes a flow of organization data

Functions

Link copied to clipboard
abstract suspend fun delete(): DeleteOrganizationResponse
abstract fun delete(callback: (DeleteOrganizationResponse) -> Unit)

Deletes the Organization of the logged-in member. All Members of the Organization will also be deleted. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. Note: This endpoint will log out the current member, as they will also be deleted

Link copied to clipboard
abstract suspend fun get(): OrganizationResponse
abstract fun get(callback: (OrganizationResponse) -> Unit)

Wraps Stytch’s organization/me endpoint.

Link copied to clipboard
abstract fun getSync(): OrganizationData?

Get member from memory without network call

Link copied to clipboard
abstract fun onChange(callback: (OrganizationData?) -> Unit)

Assign a callback that will be called when the organization data changes

Link copied to clipboard

Updates the Organization of the logged-in member. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. An Organization must always have at least one auth setting set to either RESTRICTED or ALL_ALLOWED in order to provision new Members.