Context<TActivity>.SignIn(OAuthOptions, CancellationToken) 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.
Caution
Use the OAuthFlow directly: TeamsBotApplication.GetOAuthFlow(connectionName).SignInAsync(context, ...).
Trigger user OAuth sign-in flow for the activity sender. Attempts silent token acquisition first; if no token is cached, sends an OAuthCard.
[System.Obsolete("Use the OAuthFlow directly: TeamsBotApplication.GetOAuthFlow(connectionName).SignInAsync(context, ...).")]
public System.Threading.Tasks.Task<string?> SignIn(Microsoft.Teams.Apps.OAuth.OAuthOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Use the OAuthFlow directly: TeamsBotApplication.GetOAuthFlow(connectionName).SignInAsync(context, ...).")>]
member this.SignIn : Microsoft.Teams.Apps.OAuth.OAuthOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function SignIn (Optional options As OAuthOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)
Parameters
- options
- OAuthOptions
OAuth options including connection name and card text.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The existing user token if found, or null if the sign-in flow was initiated.
- Attributes