> For the complete documentation index, see [llms.txt](https://docs.aohwv.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aohwv.dev/getting-started/02-app-registration.md).

# Step 1 — App Registration

CloudSync uses an Azure App Registration to authenticate your users via Microsoft Entra ID (Azure AD). You only need to do this once.

## 1.1 Create the registration

1. Navigate to the [Azure Portal](https://portal.azure.com)
2. Go to **Microsoft Entra ID** → **App registrations** → **New registration**
3. Fill in the form:
   * **Name:** `CloudSync` (or any name you prefer)
   * **Supported account types:** *Accounts in this organizational directory only*
   * **Redirect URI:** Leave blank for now — you'll add this after deployment
4. Click **Register**

{% hint style="info" %}
Copy the **Application (client) ID** shown on the overview page — you'll need it during first login.
{% endhint %}

***

## 1.2 Configure API permissions

Go to **API permissions** → **Add a permission** → **Microsoft Graph** → **Delegated permissions** and add the following:

| Permission  | Type      | Description                   |
| ----------- | --------- | ----------------------------- |
| `email`     | Delegated | View users' email address     |
| `openid`    | Delegated | Sign users in                 |
| `profile`   | Delegated | View users' basic profile     |
| `User.Read` | Delegated | Sign in and read user profile |

Once added, click **Grant admin consent for \[your organization]** and confirm.

{% hint style="success" %}
All four permissions should show a green **Granted** status before proceeding.
{% endhint %}

***

## 1.3 Create a client secret

1. Go to **Certificates & secrets** → **New client secret**
2. Set a description (e.g. `cloudsync-vm`) and an expiry
3. Click **Add**
4. **Copy the secret value immediately** — it won't be shown again

{% hint style="warning" %}
Store the client secret securely. You will be prompted to enter it on first SSH login to your VM.
{% endhint %}


---

# 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.aohwv.dev/getting-started/02-app-registration.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.
