Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Tools.dll Namespace: Microsoft.OData.Mcp.Tools.Commands Inheritance: System.Object

Syntax

Summary

dotnet odata-mcp try <url>: probe a service before committing to it. Fetches $metadata, reads one row from the first entity set, says which of the two is secured, checks the row against the model, and prints a verdict. With auth flags it probes again through the authenticating client; without them, on a 401 it runs OAuth discovery and prints what it found.

Examples

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

ApiKey

Gets or sets the raw API key value for the API key escape hatch.

Syntax

Property Value

Type: string?

ApiKeyHeader

Gets or sets the header name TryCommand.ApiKey is sent under.

Syntax

Property Value

Type: string?

AuthServer

Gets or sets the operator’s authorization server override.

Syntax

Property Value

Type: string?

AuthTimeout

Gets or sets how long, in seconds, an interactive grant may run before it is abandoned.

Syntax

Property Value

Type: System.Nullable<int>?

AuthToken

Gets or sets the authentication token.

Syntax

Property Value

Type: string?

BasicPassword

Gets or sets the RFC 7617 Basic authentication password.

Syntax

Property Value

Type: string?

BasicUser

Gets or sets the RFC 7617 Basic authentication user name.

Syntax

Property Value

Type: string?

ClientId

Gets or sets the OAuth client id this process authenticates as.

Syntax

Property Value

Type: string?

ClientMetadataDocument

Gets or sets the client identity metadata document (CIMD) URI.

Syntax

Property Value

Type: string?

ClientSecret

Gets or sets the OAuth client secret for a confidential client.

Syntax

Property Value

Type: string?

Grant

Gets or sets the operator’s --grant selection.

Syntax

Property Value

Type: string?

IdpClientId

Gets or sets the enterprise IdP client id used to obtain the id token the identity assertion grant exchanges.

Syntax

Property Value

Type: string?

IdpClientSecret

Gets or sets the enterprise IdP client secret.

Syntax

Property Value

Type: string?

IdpIdTokenFile

Gets or sets the path to a UTF-8 OIDC id token file for the identity assertion grant.

Syntax

Property Value

Type: string?

IdpScope

Gets or sets the scope requested from the enterprise IdP.

Syntax

Property Value

Type: string?

IdpTokenEndpoint

Gets or sets the enterprise IdP token endpoint.

Syntax

Property Value

Type: string?

IdpUrl

Gets or sets the enterprise IdP base URL.

Syntax

Property Value

Type: string?

Output

Gets or sets where the probe report is written. Defaults to Out.

Syntax

Property Value

Type: System.IO.TextWriter

RedirectUri

Gets or sets the loopback redirect URI override for the authorization code grant.

Syntax

Property Value

Type: string?

Resource

Gets or sets the RFC 8707 resource indicator / audience override.

Syntax

Property Value

Type: string?

Scopes

Gets or sets the fallback scope list requested when the authorization server advertises none.

Syntax

Property Value

Type: string?

TokenCache

Gets or sets the directory the Latchkey File and Dpapi backends store cached tokens in.

Syntax

Property Value

Type: string?

Url

Gets or sets the OData service root URL. A pasted $metadata URL is accepted.

Syntax

Property Value

Type: string?

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

OnExecuteAsync

Runs the probe and prints the report.

Syntax

Returns

Type: System.Threading.Tasks.Task<int> 0 when the service is ready, TryCommand.ExitSignInRequired when it needs sign-in no flag provided, 1 otherwise.

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?