# Adding new Instance

In this guide, you will learn how to add Instance in mobile app.

If you are after the enrollment process, please follow [this guide](#adding-instance-in-defguard)

## Enrollment via external SSO

1. Go to your enrollment page. Click **Select** under "Enrollment process".

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/t2t8idi8VNvFHaZP9vqF/defguard-enrollment-options.png" alt="" width="50%"><figcaption></figcaption></figure>

2. In this example we use Google as OIDC provider so our button is "Sign in with Google". Your organization can use different OIDC provider.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/DDgMfKjQutkRe9NW73rN/defguard-enrollment-by-sso.png" alt="" width="50%"><figcaption></figcaption></figure>

3. You will be redirected to your OIDC provider login page, please log in. After doing this, you will be redirected and shown a screen with **URL, Token and QR Code**.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/f8JE134kKtS21bFUjf9q/defguard-enrollment-sso-qr-url.png" alt="" width="50%"><figcaption></figcaption></figure>

4. Open Defguard Mobile on your smartphone
5. Click **Scan QR Code**

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/n80b4XnwI4sEc7pSPzG7/defguard-mobile-add-instance.png" alt="" width="375"><figcaption></figcaption></figure>

6. Scan QR generated in step 3.
7. Enter the name of your device. For example "iPhone 11"
8. Confirm

{% hint style="info" %}
If you can't scan QR Code, select **Add Instance Manually** in **step 5** and enter URL and Token from **step 3**.
{% endhint %}

## Enrollment via Email

Find enrollment **Instance URL** and **Token** in your "Defguard user enrollment" email. It should look like this:

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/agvVXse3XIdjzckMV161/defguard-enrollment-email.png" alt="" width="50%"><figcaption></figcaption></figure>

If you want to enroll via Web Browser, click **Start enrollment** or:

1. Go to your enrollment page. Click **Select** under "Enrollment process".

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/t2t8idi8VNvFHaZP9vqF/defguard-enrollment-options.png" alt="" width="50%"><figcaption></figcaption></figure>

2. Enter your **Token** and click **Send**.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/IzbuPlypi5MQP2OtBr06/defguard-enrollment-by-token.png" alt="" width="50%"><figcaption></figcaption></figure>

Now, follow [Enrollment via Web Browser](#enrollment-via-web-browser) guide.

## Enrollment via Web Browser

1. Upon starting enrollment process you will see something like this: **Before proceeding, read the text carefully, as it may contain important information given by your administrator,** then click **Next**.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/8KISomIKn1Sl0JTUg7fm/defguard-enrollment-step1.png" alt="" width="50%"><figcaption></figcaption></figure>

2. In this step you can optionally enter your phone number after entering it. Proceed by clicking the **Next** button.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/WnIGJzcStDz4zTOkHnH7/defguard-enrollment-step2.png" alt="" width="50%"><figcaption></figcaption></figure>

3. Now, you need to set up your password. After entering the password, proceed by clicking **Next**.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/5VEADGcQaPldKV9oBLgp/defguard-enrollment-step3.png" alt="" width="50%"><figcaption></figcaption></figure>

4. This is the step where we can add our mobile device. Enter the name of your device, then click **Create Configuration**.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/UJFNUq0rQErXEUZfcdAV/defguard-enrollment-step4.png" alt="" width="50%"><figcaption></figcaption></figure>

5. You will see a screen like this.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/vbMyegdEe0Ib36NcU0at/defguard-enrollment-step4-qr.png" alt="" width="50%"><figcaption></figcaption></figure>

6. Open Defguard on your mobile device. Click **Scan QR Code**, and scan the code from **step 5**.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/n80b4XnwI4sEc7pSPzG7/defguard-mobile-add-instance.png" alt="" width="375"><figcaption></figcaption></figure>

7. After scanning the QR code, enter the name of your device and confirm.

{% hint style="info" %}
If you can't scan QR Code, select **Add Instance Manually** in **step 6** and enter URL and Token from **step 5**.
{% endhint %}

## Adding Instance in Defguard

1. Log in to your Defguard account.
2. Go to **My Profile** tab.
3. Click **Add new device** button inside **User Devices** list.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/jS5JYtcuZYwE3OiSfYkB/defguard-myprofile-add-device.png" alt="" width="50%"><figcaption></figcaption></figure>

4. Select **Remote Device Activation** and click **Next**.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/geIM5pDJKQKXfM8Tfaxh/defguard-add-new-device.png" alt="" width="50%"><figcaption></figcaption></figure>

5. After that you will see URL, Token and QR Code. **Take a screenshot of QR code**, we will need it in next step.

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/ji7l59NqcQqSq3yjWRFb/defguard-add-instance-qr.png" alt="" width="50%"><figcaption></figcaption></figure>

6. Open Defguard Mobile on your smartphone
7. Click **Scan QR Code**

<figure><img src="https://content.gitbook.com/content/e86iamwJVSYnIRsyVEAV/blobs/n80b4XnwI4sEc7pSPzG7/defguard-mobile-add-instance.png" alt="" width="375"><figcaption></figcaption></figure>

8. Scan QR generated in step 5.
9. Enter the name of your device. For example "iPhone 11"
10. Confirm

{% hint style="info" %}
If you can't scan QR Code, select **Add Instance Manually** in **step 4** and enter URL and Token from **step 5**.
{% endhint %}
