## GetClientAsync(IMultipleServicesTokenProvider, string) {#getclientasync}

Initializes a new instance of the [`GraphClient`](../) based class

```csharp
public static IGraphClientAsync GetClientAsync(IMultipleServicesTokenProvider tokenProvider, 
    string tenantId)
```

| Parameter | Type | Description |
| --- | --- | --- |
| tokenProvider | IMultipleServicesTokenProvider | Token provider allows to retrieve OAuth access token |
| tenantId | String | A tenant is representation of an organization. It's a dedicated instance of Azure AD that an organization or app developer receives when the organization or app developer, creates a relationship with Microsoft like signing up for Azure, Microsoft Intune, or Microsoft 365. |

### Return Value

Returns IGraphClientAsync object

### See Also

* interface [IGraphClientAsync](../../igraphclientasync/)
* interface [IMultipleServicesTokenProvider](../../../aspose.email.clients/imultipleservicestokenprovider/)
* class [GraphClient](../)
* namespace [Aspose.Email.Clients.Graph](../../graphclient/)
* assembly [Aspose.Email](../../../)

---

## GetClientAsync(ITokenProvider, string) {#getclientasync_1}

Initializes a new instance of the [`GraphClient`](../) based class

```csharp
public static IGraphClientAsync GetClientAsync(ITokenProvider tokenProvider, string tenantId)
```

| Parameter | Type | Description |
| --- | --- | --- |
| tokenProvider | ITokenProvider | Token provider allows to retrieve OAuth access token |
| tenantId | String | A tenant is representation of an organization. It's a dedicated instance of Azure AD that an organization or app developer receives when the organization or app developer, creates a relationship with Microsoft like signing up for Azure, Microsoft Intune, or Microsoft 365. |

### Return Value

Returns IGraphClientAsync object

### See Also

* interface [IGraphClientAsync](../../igraphclientasync/)
* interface [ITokenProvider](../../../aspose.email.clients/itokenprovider/)
* class [GraphClient](../)
* namespace [Aspose.Email.Clients.Graph](../../graphclient/)
* assembly [Aspose.Email](../../../)


