> ## Documentation Index
> Fetch the complete documentation index at: https://ai.easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuthErrorPayload

> The RFC 6749 section 5.2 error response returned from a token, device authorization, or dynamic client registration endpoint.

## Definition

**Assembly:** Microsoft.OData.Mcp.Authentication.dll

**Namespace:** Microsoft.OData.Mcp.Authentication.Outbound

**Inheritance:** System.Object

## Syntax

```csharp theme={null}
Microsoft.OData.Mcp.Authentication.Outbound.OAuthErrorPayload
```

## Summary

The RFC 6749 section 5.2 error response returned from a token, device authorization, or dynamic client
registration endpoint.

## Remarks

Deserialized exclusively through [OutboundOAuthJsonContext](https://learn.microsoft.com/dotnet/api/microsoft.odata.mcp.authentication.outbound.outboundoauthjsoncontext) (AOT: JSON source-gen; no
reflection). RFC 8628 device code polling reuses this same error shape for
`authorization_pending`, `slow_down`, `expired_token`, and `access_denied`.

## Examples

```csharp theme={null}
var payload = JsonSerializer.Deserialize(json, OutboundOAuthJsonContext.Default.OAuthErrorPayload);
if (payload?.Error == ODataMcpAuthConstants.ErrorAuthorizationPending)
{
    // Keep polling.
}
```

## Constructors

### &#x20;.ctor

#### Syntax

```csharp theme={null}
public OAuthErrorPayload()
```

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public Object()
```

## Properties

### &#x20;Error

Gets or sets the RFC 6749 error code, such as `invalid_grant`.

#### Syntax

```csharp theme={null}
public string Error { get; set; }
```

#### Property Value

Type: `string`

### &#x20;ErrorDescription

Gets or sets the human readable error description, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the server did
not supply one.

#### Syntax

```csharp theme={null}
public string ErrorDescription { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;ErrorUri

Gets or sets a URI identifying a human readable web page describing the error, or
[`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the server did not supply one.

#### Syntax

```csharp theme={null}
public string ErrorUri { get; set; }
```

#### Property Value

Type: `string?`

## Methods

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual string ToString()
```

#### Returns

Type: `string?`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.