# Register Inforiver App with Certificate

Registering your application is essential for establishing a trust relationship between your application and the Microsoft identity platform. This guide instructs you to register your Inforiver application with a self-signed certificate.&#x20;

## Creating a Certificate&#x20;

To create a self-signed public certificate, please follow the official documentation [here.](https://learn.microsoft.com/en-us/entra/identity-platform/howto-create-self-signed-certificate)

## Registering an application&#x20;

The first step in registering an application with the self-signed certificate is to register a new application in your Azure AD.&#x20;

1. Log in to your Azure Portal.
2. Click on **Manage Azure Active Directory** from the menu tab.
3. Click **App registrations** in the left sub-menu.
4. Click the **New registration** tab in the top menu bar as shown in the screenshot below.&#x20;

<figure><img src="/files/5Va2gG68gi9PONQKFBTO" alt=""><figcaption></figcaption></figure>

5. Enter an application name to be displayed to the users.
6. In the section 'Who can use this application', select **Accounts in this organizational directory only.**
7. You can skip the 'Redirect URI' section for now. We can provide this after getting the URL of the application.
8. Click **Register** to register the application.

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

9. Finally, upload your self-signed certificate to the certificate section, as described in the steps below.

* Select **Certificates & secrets > Certificates > Upload certificate**.
* Select the file you want to upload. It must be one of the following file types: *.cer*, *.pem,* or *.crt*.
* Select **Add**.

<figure><img src="/files/7sMz0X4wO8rKAkCAKqTd" alt=""><figcaption></figcaption></figure>

* Use the following command to convert the encoding key in proper line format and apply the output in the env variables of the app service.

```sh
awk -v ORS='\\n' '1' test.pem | pbcopy
```

<figure><img src="/files/JFlGWShZzcKFZVB3Xh6h" alt=""><figcaption><p>sample converted pem file</p></figcaption></figure>

## Environment variables settings

To make changes to your environment, go to your app service's **Environment variables** section.

1. In the Environment variables section, add the following envs:

* O365\_APP\_CERTIFICATE\_CREDENTIALS
* O365\_APP\_PRIVATE\_KEY
* O365\_APP\_CERTIFICATE\_THUMBPRINT

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

2. On **O365\_APP\_CERTIFICATE\_CREDENTIALS**, the value should be the self-signed certificate body. The values should be given as shown below.

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

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

3. The value for **O365\_APP\_PRIVATE\_KEY** should be the self-signed certificate's private key. The values should be given as shown below.

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

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

4. The value for **O365\_APP\_CERTIFICATE\_THUMBPRINT** should be the thumbprint value of the self-signed certificate. This can be obtained from the Azure AD application - Certificate section.

Once all three environment variables have been added, save the settings, and the app service will restart to reflect the changes.

{% hint style="info" %}
If you use certificate and secrets at the same time, our application will prioritize and authenticate through certificate over secrets.
{% endhint %}

By following the above steps, you can run the Inforiver application registered with the certificate.

#### References:

1. Register app: <https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app>
2. Create self-signed certificate: <https://learn.microsoft.com/en-us/entra/identity-platform/howto-create-self-signed-certificate>


---

# Agent Instructions: 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:

```
GET https://docs.inforiver.com/inforiver-enterprise-on-prem/how-to-guides/register-inforiver-app-with-certificate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
