---
title: "Configure Custom User Data"
method: PATCH
path: "/groups/{groupId}/apps/{appId}/custom_user_data"
tags: ["custom-user-data"]
---

# Configure Custom User Data

`PATCH /groups/{groupId}/apps/{appId}/custom_user_data`

Modify the [Custom User
Data](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/)
configuration for an Atlas App Services App.

## Request body

- CustomUserDataConfig
  - `mongo_service_id` string — The `_id` value of the linked MongoDB data source that contains custom user data. See [Get a Data Source](#operation/adminGetService).
  - `database_name` string — The name of the database that contains custom user data.
  - `collection_name` string — The name of the collection that contains custom user data.
  - `user_id_field` string — The name of a field that appears in every custom user data document and that contains the user account ID of each document's corresponding user.
  - `on_user_creation_function_id` string — The `_id` value of a [user creation function](https://www.mongodb.com/docs/atlas/app-services/users/enable-custom-user-data/#std-label-user-creation-function) that runs whenever a new user registers.
  - `enabled` boolean — If `true`, custom user data is enabled.

## Response `204`

Success

---

[API](https://skmtc.dev/mongodb/apis/mongodb-atlas-app-services-admin-api.md) · [All operations](https://skmtc.dev/mongodb/apis/mongodb-atlas-app-services-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mongodb/mongodb-atlas-app-services-admin-api/revisions/eb671cf4e125/schema)
