# IRPCServerAdmin.JoinSubscription

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/JoinSubscription/

Badges: `Administration API / specialized` `admin` `session`

Joins the server to an M-Files Manage subscription.

- **Service:** [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md) `MFiles.IRPCServerAdmin`
- **gRPC method:** `/MFiles.IRPCServerAdmin/JoinSubscription`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/join-subscription`
- **Request:** [`JoinSubscriptionRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/JoinSubscription/index.md#request)
- **Response:** [`JoinSubscriptionResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/JoinSubscription/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Changes how the server is managed. Test first with
  [JoinSubscriptionTest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/JoinSubscriptionTest/index.md).
- Requires the system administrator server role (server rights `edit_server_properties`,
  `manage_logins` and `shutdown`).
- Fails with "Access denied." if the server already uses M-Files Manage
  (`SubscriptionInfo.uses_one_db`).

<a id="request"></a>

## Request: JoinSubscriptionRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `token` | `string` | The access token from M-Files Manage that authorizes joining. |
| `subscription_id` | `string` | The ID of the subscription to join. |

<a id="response"></a>

## Response: JoinSubscriptionResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `subscription_info` | [`SubscriptionInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SubscriptionInfo/index.md) | The subscription information after joining. |
| `subscription_info.authentication_server` | `string` | The network address (name) of the mAuth server. |
| `subscription_info.subscription` | `string` | The subscription info server is joined to. |
| `subscription_info.manage_address` | `string` | The URL to the manage web. |
| `subscription_info.uses_one_db` | `bool` | True if server uses OneDb. |
| `subscription_info.can_join` | `bool` | True to allow changing the OneDb configuration. |
| `subscription_info.is_on_prem` | `bool` | True if joined to subscription and not in container. |
| `subscription_info.is_isolated` | `bool` | True if server is in isolated container. |

<a id="related"></a>

## Related methods

- [JoinSubscriptionTest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/JoinSubscriptionTest/index.md): Checks whether the server could join an M-Files Manage subscription, and lists the vaults that would prevent it.
