> ## Documentation Index
> Fetch the complete documentation index at: https://mooncamp.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure SCIM integration

> An overview on how to set up user provisioning with Azure via SCIM in Mooncamp.

## User provisioning described

With user provisioning you can get all user profiles from your company’s identity provider (i.e. Azure) synchronized with Mooncamp. This means when a new employee joins or leaves your organization and would need to be added or deleted as a user to Mooncamp, it will happen automatically once the employee gets added or deleted in your identity provider.

<Info>
  User provisioning is an **Enterprise feature** and needs to be configured by Mooncamp first. Additionally, your IT administrators might need to first approve Mooncamp as a provider before you can set up user provisioning.
</Info>

## Setting up user provisioning with Azure

In order to set up SSO in your account, Navigate to `Settings` → `Security and Identity` → `User Provisioning`

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=3bee2e683a393c05e3c4caa911529a88" width="2698" height="1456" data-path="images/Untitled.webp" />
</Frame>

Click on `Activate user provisioning`. User provisioning is now activated for your account. An `API token` is required to initiate configuration at azure. Visit [https://portal.azure.com](https://portal.azure.com) and navigate to `Enterprise applications`.

<Frame>
  <img src="https://mintcdn.com/mooncamp/X1vK5kyLBLfB2CC3/images/Untitled%201.webp?fit=max&auto=format&n=X1vK5kyLBLfB2CC3&q=85&s=12ea1193636c3c2b6cec09faf572624f" width="164" height="155" data-path="images/Untitled 1.webp" />
</Frame>

Click `New application`:

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%202.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=ad20d311e768e8de8f55e52cf5d80760" width="1772" height="382" data-path="images/Untitled 2.webp" />
</Frame>

Click `+ Create your own application` and name the app `Mooncamp user provisioning`:

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%203.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=065d55b0865143bd148fc7f77cabc453" width="580" height="267" data-path="images/Untitled 3.webp" />
</Frame>

Select `• Integrate any other application you don't find in the gallery (Non-gallery)` and click `Create`. You can ignore the suggestions found from gallery applications.

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%204.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=1b6f4bf0bf8414787dae8bb59832901a" width="877" height="896" data-path="images/Untitled 4.webp" />
</Frame>

Navigate to `Provisioning` and click `Get started`:

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%205.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=e6dcc5e702e6f16f8b090e1c3e239594" width="371" height="375" data-path="images/Untitled 5.webp" />
</Frame>

Then select `Provisioning Mode` → `Automatic`. As a Tenant URL add: *[https://identity.mooncamp.com/scim/v2](https://identity.mooncamp.com/scim/v2)* and under Secret Token insert the `API token` copied from Mooncamp’s setting menu.

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%206.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=5de768adc23a0b3a3791e4d4f07e8a1b" width="1100" height="414" data-path="images/Untitled 6.webp" />
</Frame>

After clicking `Test Connection` you should get a positive feedback.

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%207.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=ea87d26fe33f2e35730741d6f9ad9bdb" width="525" height="172" data-path="images/Untitled 7.webp" />
</Frame>

Click on `Save`, expand `Mappings` and click on `Provision Azure Active Directory Users`. Find the entry mapping and select it. Set the `Matching precedence` to 2 and click `Ok`.

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%208.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=029ea176adbb51f589582a5bd391aa56" width="1080" height="721" data-path="images/Untitled 8.webp" />
</Frame>

Find the entry mapping and select it. Change `mailNickname` to `objectId` and set `Match objects using this attribute` to `Yes`. `Matching precedence` should be `1`. Click `Ok`.

Click again on the entry mapping `userPrincipalName` → `userName` and set `Match objects using this attribute` to `No` leaving us with a single entry configuring a `Matching precedence`.

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%209.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=bf6d5ddc469c8413e0bf644414376141" width="1772" height="1193" data-path="images/Untitled 9.webp" />
</Frame>

Click on `Save` and then on `Provisioning` at the top of the page.

<Frame>
  <img src="https://mintcdn.com/mooncamp/X1vK5kyLBLfB2CC3/images/Untitled%2010.webp?fit=max&auto=format&n=X1vK5kyLBLfB2CC3&q=85&s=e48f3cdf5b474018754edf502987c0e3" width="1413" height="98" data-path="images/Untitled 10.webp" />
</Frame>

Select `Provision Azure Active Directory Groups`. Find the entry mapping and select it. Set the `Matching precedence` to `2`. Click on `Ok`. Find the entry mapping and select it. Set `Match objects using this attribute` to `Yes`. Again find the entry mapping `displayName` → `displayName` and set `Match objects using this attributes` to `No`.

<Frame>
  <img src="https://mintcdn.com/mooncamp/X1vK5kyLBLfB2CC3/images/Untitled%2011.webp?fit=max&auto=format&n=X1vK5kyLBLfB2CC3&q=85&s=f0de008bbf47c3803eb7cd5db76b16c7" width="1750" height="258" data-path="images/Untitled 11.webp" />
</Frame>

Click on `Save`and configure `Users and groups` according to your requirements. Click on `Start provisioning`.

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%2012.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=bc5a5c704bc7694be5d8b94b0039d066" width="1273" height="82" data-path="images/Untitled 12.webp" />
</Frame>

It can take up to an hour until the initial run of the provisioning is started. If the initial run is complete you can start pulling in the users into Mooncamp.

Navigate again to `Settings` → `Security and Identity` → `User Provisioning` within Mooncamp. You should now see that there are users available to be synced to Mooncamp

<Frame>
  <img src="https://mintcdn.com/mooncamp/aeHHutl4td1OGlYh/images/Untitled%2013.webp?fit=max&auto=format&n=aeHHutl4td1OGlYh&q=85&s=8884ac30bfe0b2ea9aa0ea23f22862a5" width="494" height="275" data-path="images/Untitled 13.webp" />
</Frame>

Click on `Synchronize` to push these users to Mooncamp. Under `Members` you should now find these users. The `Attribute Mapping` section allows you to map any *SCIM attribute* to *Mooncamp Properties*. Read more about *Mooncamp Properties* here: [Properties](/properties).

Users are automatically synchronized to Mooncamp daily. To immediatly synchronize any change provisioned through Azure use the `Synchronize` button.
