---
title: "IGraphClientAsync.CreateRuleAsync"
url: "https://reference.aspose.com/email/net/aspose.email.clients.graph/igraphclientasync/createruleasync/"
product: "Aspose.Email for .NET API Reference"
description: "IGraphClientAsync method. Asynchronously creates an inbox rule"
---

## IGraphClientAsync.CreateRuleAsync method

Asynchronously creates an inbox rule.

```csharp
public Task<InboxRule> CreateRuleAsync(InboxRule rule, 
    CancellationToken cancellationToken = default)
```

| Parameter | Type | Description |
| --- | --- | --- |
| rule | InboxRule | The [`InboxRule`](../../../aspose.email.clients.exchange/inboxrule/) to create. |
| cancellationToken | CancellationToken | A cancellation token to observe while waiting for the task to complete. |

### Return Value

A task that represents the asynchronous operation. The task result contains the created [`InboxRule`](../../../aspose.email.clients.exchange/inboxrule/).

### See Also

* class [InboxRule](../../../aspose.email.clients.exchange/inboxrule/)
* interface [IGraphClientAsync](../)
* namespace [Aspose.Email.Clients.Graph](../../igraphclientasync/)
* assembly [Aspose.Email](../../../)


