Definition
Assembly: Microsoft.OData.Mcp.Authentication.dll Namespace: Microsoft.OData.Mcp.Authentication.Outbound Inheritance: System.ExceptionSyntax
Summary
Thrown when interactive sign-in is required to complete an outbound OAuth grant and OutboundOAuthOptions.ConsentPresenter isnull — the mid-session path,
where the caller (an MCP tool invocation) must elicit the operator instead of blocking on stderr.
Remarks
This type lives inMicrosoft.OData.Mcp.Authentication.Outbound, not Tools, so Authentication never
references Tools. Per AUTH-12 the wrapped OAuthConsentRequiredException.Request never carries an access token, a
refresh token, or a device_code — only what is needed to complete sign-in out of band. This type
is not marked [Serializable].
Examples
Constructors
.ctor
Initializes a new instance of the OAuthConsentRequiredException class.Syntax
Parameters
Exceptions
.ctor
Initializes a new instance of the OAuthConsentRequiredException class with the exception that caused sign-in to become necessary, such as a failed token refresh.Syntax
Parameters
Exceptions
Properties
ElicitationId
Gets OAuthConsentRequiredException.Request’s OutboundConsentRequest.ElicitationId.Syntax
Property Value
Type:string
Kind
Gets OAuthConsentRequiredException.Request’s OutboundConsentRequest.Kind.Syntax
Property Value
Type:Microsoft.OData.Mcp.Authentication.Outbound.OutboundGrantKind
Request
Gets the consent request that must be completed before the interrupted call can succeed.Syntax
Property Value
Type:Microsoft.OData.Mcp.Authentication.Outbound.OutboundConsentRequest
Url
Gets OAuthConsentRequiredException.Request’s OutboundConsentRequest.Url.Syntax
Property Value
Type:System.Uri
UserCode
Gets OAuthConsentRequiredException.Request’s OutboundConsentRequest.UserCode.Syntax
Property Value
Type:string?
VerificationUri
Gets OAuthConsentRequiredException.Request’s OutboundConsentRequest.VerificationUri.Syntax
Property Value
Type:System.Uri?