> For the complete documentation index, see [llms.txt](https://docs.gospace.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gospace.com/integrations/mapping-your-data/map-your-directory/users-with-teams.md).

# Users with teams

<figure><img src="/files/pNzL7z08SJ9Hvth4ddlg" alt=""><figcaption></figcaption></figure>

When setting up the integration for importing users with teams into gospace, you'll need to map the columns from your CSV file to the appropriate user and team fields. Here's how you can set up the mapping:

## **User Fields:**

**Mandatory fields for your integration:**

* **User ID**: Select the column from your CSV file that contains a unique identifier for each user, such as an employee ID or username.
* **Email**: Select the column that contains the email address for each user.
* **First Name**: Select the column that contains the first name of each user.
* **Last Name**: Select the column that contains the last name of each user.

**Optional fields for your integration:**

* **Occupancy Mapping ID/Host ID** (Optional): If your CSV file contains a unique identifier to map between user import and occupancy data such as employee ID. <mark style="color:red;">We strongly recommend you include this field if you have any intention of using our real time integration, as this tells the system which occupancy records relate to which users.</mark>
* Active Start Date": If your CSV includes a column indicating when each user's access should start, map it to this field, this will populate within gospace AI to ensure the users account is not activated until the date set, this is useful for new starters.
* "Active End Date": If your CSV includes a column indicating when each user's access should end, map it to this field, this will populate within gospace AI to ensure the users account is deactivated on the date set, this is useful for when you know a user is leaving the organisation.

***

## **Team Fields:**

**Mandatory fields:**

* **Team ID**: Select the column from your CSV file that contains a unique identifier for each team.
* **Team Name**: Select the column that contains the name of each team.

**Optional fields:**

* **Allow Guests** (Optional): If your CSV file includes a column indicating whether each team allows guest access, (meaning a team can be scheduled with by both users in and not in the team) select that column here.

***

#### Microsoft AD

<figure><img src="/files/EDvrYLdzMHOGSOL0hHSL" alt="" width="364"><figcaption></figcaption></figure>

When using the Microsoft AD integration, you may notice a "Team fields" option. This determines which AD collection we retrieve team data from. Not all AD organisations use groups for team data; some store this information in the users collection. The "Team fields" option is only visible if a groups collection exists in the AD connection. If not, the users collection is used for everything.

### Summary

After setting up your user and team mapping and filters, review your configuration carefully to ensure everything is correct. Then, run a small test import to verify that users and teams are being created correctly in gospace based on your CSV data.

If you run into any issues or have questions, gospace support is available to help you troubleshoot and ensure your integration is set up properly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gospace.com/integrations/mapping-your-data/map-your-directory/users-with-teams.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
