> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# UseOAuth

## Definition

If this property is set to true, a Connect button will appear in the dialogue for configuring the adapter that will call **OnAuthorizeAccount()** when the user clicks it.

## Property Value

A bool value determining if the **OnAuthorizeAccount()** method should be called in order to authorize the account to the social service.

This property should ONLY be set from the **OnStateChange()** method during State.SetDefaults.

## Syntax

`UseOAuth`

## Examples

```csharp
protected override void OnStateChange()
{         
   if (State == State.SetDefaults)
   {
      UseOAuth = true;
   }
}
```