# Multi-Stamp Azure Stack Hub

## How to add connection details for multiple Azure Stack Hub connections for Usage & Billing?

* Have the certificate installed and connections details for the target Azs Hub Platform. Details that would be needed (can be obtained from billing registration.txt):&#x20;
  * SubscriptionId&#x20;
  * ApplicationId&#x20;
  * AdminArmEndpointUrl
  * AuthorityEndpointUrl
  * TokenRequestResourceUrl
  * CertificateThumbprint
  * IsAdfs
  * TenantId&#x20;
* Execute the below command with appropriate details for each stamp,

```bash
Billing.exe CreateAzureStackConnection <adminSubscriptionId> <tenantId> <applicaionId> <certificateThumbprint> <adminArmEndpoint>
        <tokenRequestResourceUrl> <authorityEndpointUrl> [/applicationSecret:<String>] [/isAdfs]
        [/ApiEndpoint:<String>] [/Username:<String>] [/Password:<String>] [/IsSkipPrompts:<True|False>]
        [/ExportToCsv:<True|False>] [/ExportToFileName:<String>]
```

* Enable '"AzsHubUsageProcessorIsEnabled' in Cost Management agent config. Check the below link for more details,

{% content-ref url="broken-reference" %}
[Broken link](https://docs.cloudassert.com/azure-stack-billing/2010.2/others/broken-reference)
{% endcontent-ref %}

* Enable the AzsHubUsageRecordProcessor from Billing Agent service.
* Configure the \[dbo].\[SubscriptionMapper] with the UsageSource Id and external subscription Id (azs subscription id) column value.

**Validation:**

* Verify the Connection is added successfully in Config.Connections in Cost  Management database.
* Verify the AzsHubUsageRecordProcessingStatusData for the processing status, the data will be populated in the Raw usage records table.


---

# 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.cloudassert.com/azure-stack-billing/2010.2/others/multi-stamp-azure-stack-hub.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.
