Context<TActivity>.IsSignedInAsync(String, 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).IsSignedInAsync(context, ...).
Check whether the user has a valid cached token for a given OAuth connection.
[System.Obsolete("Use the OAuthFlow directly: TeamsBotApplication.GetOAuthFlow(connectionName).IsSignedInAsync(context, ...).")]
public System.Threading.Tasks.Task<bool> IsSignedInAsync(string? connectionName = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Use the OAuthFlow directly: TeamsBotApplication.GetOAuthFlow(connectionName).IsSignedInAsync(context, ...).")>]
member this.IsSignedInAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function IsSignedInAsync (Optional connectionName As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parameters
- connectionName
- String
The connection name to check. If null, uses the single registered connection.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
True if the user has a valid token; false otherwise.
- Attributes