---
name: "sasl_user_exists"
section: "3"
platform: "macos"
package: "passwordserver_sasl"
version: "215"
release: "macOS 26.5"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/sasl_user_exists"
---

# sasl\_user\_exists(3)

Check if a user exists on server

## NAME

sasl\_user\_exists - Check if a user exists on server

## SYNOPSIS

```
#include <sasl/sasl.h>

int sasl_user_exists( sasl_conn_t *conn,
                      const char *service, const char *user_realm,
                      const char *user)
```

## DESCRIPTION

**sasl\_user\_exists** will check if a user exists on the server.

*conn* a connection context

*service* Service name or NULL (for service name of connection context)

*user\_realm* Realm to check in or NULL (for default realm)

*user* User name to check for existence of.

## RETURN VALUE

Returns SASL\_OK on success. SASL error code on failure.

## CONFORMING TO

RFC 4422

## SEE ALSO

[sasl(3)](/sasl/3.md), [sasl\_errors(3)](/sasl_errors/3.md)
