OAuthFlow.SignInAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| SignInAsync<TActivity>(Context<TActivity>, CancellationToken) |
Attempt silent token acquisition; if no token is available, send an OAuthCard to initiate the SSO flow. |
| SignInAsync<TActivity>(Context<TActivity>, OAuthOptions, CancellationToken) |
Attempt silent token acquisition; if no token is available, send an OAuthCard to initiate the SSO flow. |
SignInAsync<TActivity>(Context<TActivity>, CancellationToken)
Attempt silent token acquisition; if no token is available, send an OAuthCard to initiate the SSO flow.
public System.Threading.Tasks.Task<string?> SignInAsync<TActivity>(Microsoft.Teams.Apps.Context<TActivity> context, System.Threading.CancellationToken cancellationToken = default) where TActivity : Microsoft.Teams.Apps.Schema.TeamsActivity;
member this.SignInAsync : Microsoft.Teams.Apps.Context<'Activity (requires 'Activity :> Microsoft.Teams.Apps.Schema.TeamsActivity)> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string> (requires 'Activity :> Microsoft.Teams.Apps.Schema.TeamsActivity)
Public Function SignInAsync(Of TActivity As TeamsActivity) (context As Context(Of TActivity), Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)
Type Parameters
- TActivity
The activity type.
Parameters
- context
- Context<TActivity>
The current turn context.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The token if already cached, or null if SSO was initiated (the result will arrive via OnSignInComplete(SignInCompleteHandler)).
Applies to
SignInAsync<TActivity>(Context<TActivity>, OAuthOptions, CancellationToken)
Attempt silent token acquisition; if no token is available, send an OAuthCard to initiate the SSO flow.
public System.Threading.Tasks.Task<string?> SignInAsync<TActivity>(Microsoft.Teams.Apps.Context<TActivity> context, Microsoft.Teams.Apps.OAuth.OAuthOptions? options, System.Threading.CancellationToken cancellationToken = default) where TActivity : Microsoft.Teams.Apps.Schema.TeamsActivity;
member this.SignInAsync : Microsoft.Teams.Apps.Context<'Activity (requires 'Activity :> Microsoft.Teams.Apps.Schema.TeamsActivity)> * Microsoft.Teams.Apps.OAuth.OAuthOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string> (requires 'Activity :> Microsoft.Teams.Apps.Schema.TeamsActivity)
Public Function SignInAsync(Of TActivity As TeamsActivity) (context As Context(Of TActivity), options As OAuthOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)
Type Parameters
- TActivity
The activity type.
Parameters
- context
- Context<TActivity>
The current turn context.
- options
- OAuthOptions
OAuth options for customizing the sign-in card text.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The token if already cached, or null if SSO was initiated (the result will arrive via OnSignInComplete(SignInCompleteHandler)).