# Create an App Registration in Entra ID

*Applies to: Patch My PC Cloud*

There may be some scenarios (such as [Recover Your Company](https://docs.patchmypc.com/patch-my-pc-cloud/manage/manage-settings/company-settings/recover-your-cloud-company) ) where you need to create an App Registration in Entra ID for use with Patch My PC (PMPC) Cloud.

{% hint style="warning" %}
**Important**

Once you create an App Registration, it must be used within 72 hours; otherwise, it will be considered expired, and you will need to create a new one.
{% endhint %}

We use this process to verify you are an Application Administrator or a higher privilege user (such as a Global Admin), in the same Entra ID tenant as the PMPC Company being managed.

To create an App Registration:

1. Sign in to the Microsoft Azure portal using an account with the Global Admin role and navigate to the [App Registrations](https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) blade.

{% hint style="warning" %}
**Important**

You must use an account in the same Microsoft 365 subscription (tenant) as your PMPC Company.
{% endhint %}

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2F05HlueVjyeXxbW1zbGyF%2Fimage.png?alt=media&#x26;token=7fce786e-5ca0-4a89-98d3-c5f703687f84" alt="Navigating to the &#x27;App registrations&#x27; blade" width="563"><figcaption></figcaption></figure>

2. Click **New registration**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FkiHioAGJVZTjN32SuuAt%2Fimage.png?alt=media&#x26;token=ba488c36-c2ec-4b60-8c91-24f24e0414b9" alt="Clicking &#x27;New registration&#x27;" width="563"><figcaption></figcaption></figure>

3. In the **Name** field, enter **PMPC Recovery**, then click **Register**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FmWOXceIpoEWzBf9amFEx%2Fimage.png?alt=media&#x26;token=67356243-6add-4de8-b224-39bbd228e7f3" alt="Entering &#x27;PMPC Recovery&#x27; then clicking &#x27;Register&#x27;" width="563"><figcaption></figcaption></figure>

4. Make a note of the following values:
   1. **Application (client) ID**
   2. **Object ID**
   3. **Directory (tenant) ID**

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FGCvQaopWvDk9kIMeHP6h%2Fimage.png?alt=media&#x26;token=3c054b24-7428-4276-b514-9e0175916ad6" alt="Noting the required values" width="563"><figcaption></figcaption></figure>

5. Navigate to **Manage | API Permissions**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FkdROXrgwtkF1LkOtIdPX%2Fimage.png?alt=media&#x26;token=720f7836-04e9-4128-a453-d94bf40e4920" alt="Navigating to &#x27;Manage | API Permissions&#x27;" width="563"><figcaption></figcaption></figure>

6. Under the **Configured permissions** section, click **Add a permission**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FtluUMokS8gTdRAPbkrCG%2Fimage.png?alt=media&#x26;token=f35a6dea-f3c1-4484-86f9-91b3ad59df56" alt="Clicking &#x27;Add a permission&#x27;" width="563"><figcaption></figcaption></figure>

7. In the **Request API permissions** blade, click **Microsoft Graph**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FnrWoXQfuMV75rHowKYBT%2Fimage.png?alt=media&#x26;token=a84ca4d8-e150-419f-88c1-013b263eb26b" alt="Clicking &#x27;Microsoft Graph&#x27;" width="563"><figcaption></figcaption></figure>

8. In the **Request API permissions** blade, click **Application permissions**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2F3B9CXjA3uoCxVjQfmoxD%2Fimage.png?alt=media&#x26;token=ca16dd0e-3247-4acb-8f1a-2573969c95a4" alt="Clicking “Application permissions”" width="563"><figcaption></figcaption></figure>

9. In the **Select permissions** field, type **AuditLog**, then expand this section and check the **AuditLog.Read.All** permission checkbox.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2F1fnVCSw0kMHGdYGTnV9g%2Fimage.png?alt=media&#x26;token=f950ce3b-cc3b-4652-903a-f1b5f8edb9dd" alt="Checking the &#x27;AuditLog.Read.All&#x27; permission checkbox" width="563"><figcaption></figcaption></figure>

10. Click **Add permissions**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FyzSgHXtnhpO5WS5UiEOk%2Fimage.png?alt=media&#x26;token=360c3624-9c4f-4394-a158-67e2cc7859dd" alt="Clicking &#x27;Add permissions&#x27;" width="563"><figcaption></figcaption></figure>

11. On the **API permissions** screen, under the **Configured permissions** section, click **Grant admin consent for <*****your\_tenant\_name*****>**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2Feq6lqJ1znfQSk0vcacMr%2Fimage.png?alt=media&#x26;token=028bff36-9202-49be-ad34-d8aff141cc37" alt="Clicking &#x27;Grant admin consent for <your_tenant_name>&#x27;" width="563"><figcaption></figcaption></figure>

12. On the **Grant admin consent confirmation** popup, click **Yes**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FL9OQZ7V5RxJrs29Skl8e%2Fimage.png?alt=media&#x26;token=50e8e815-b11a-4140-af3a-0f521aa42ef7" alt="Clicking &#x27;Yes&#x27; on the &#x27;Grant admin consent confirmation&#x27; popup" width="563"><figcaption></figcaption></figure>

The **Grant consent - Grant consent successful** notification is shown and the **Status** for the **AuditLog.Read.All** permission changes to a green tick.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FRrDjBr18tkLfF6xPBT26%2Fimage.png?alt=media&#x26;token=f206d1d0-a659-4dc5-827e-fc0ac4fb99ba" alt="&#x27;Grant consent - Grant consent successful notification&#x27; shown and the &#x27;Status&#x27; for the &#x27;AuditLog.Read.All&#x27; permission changes to a green tick." width="563"><figcaption></figcaption></figure>

13. Navigate to **Certificates and secrets**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2Fr4HEGkeeWDhMLEw2CbfQ%2Fimage.png?alt=media&#x26;token=161675f6-d21a-4c60-984a-dfd4b0ecf032" alt="Navigating to &#x27;Certificates and secrets&#x27;" width="563"><figcaption></figcaption></figure>

14. Under the **Client secrets** section, click **New client secret**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2Fdrq3VHc3EqQ3m6M5583H%2Fimage.png?alt=media&#x26;token=c74bfa96-7bce-4dc0-84df-eb28af2d0d5d" alt="Clicking &#x27;New client secret&#x27; under the &#x27;Client secrets&#x27; section" width="563"><figcaption></figcaption></figure>

15. In the **Add a client secret** panel, type **PMPC Recovery**, then click **Add**.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FjAyHnfeq6PHwdViEeMhD%2Fimage.png?alt=media&#x26;token=48f75d3c-fc31-444f-8436-d2136eed37ab" alt="Typing &#x27;PMPC Recovery&#x27; in the &#x27;Description&#x27; field, then clicking &#x27;Add&#x27;" width="563"><figcaption></figcaption></figure>

The new Client Secret appears along with the **Update application credentials - Successfully updated application PMPC Recovery credentials** notification.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FTHR6aUMLGSNi3hLdKn2v%2Fimage.png?alt=media&#x26;token=a478d492-7327-4116-b6fd-0e66610b4c06" alt="New Client Secret and the &#x27;Update application credentials - Successfully updated application PMPC Recovery credentials&#x27; notification" width="563"><figcaption></figcaption></figure>

16. Make a note of the **Value** of the **PMPC Recovery** client secret.
