CommunicationIdentityClient.CreateUserAndTokenAsync 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 |
|---|---|
| CreateUserAndTokenAsync(String, IEnumerable<CommunicationTokenScope>, CancellationToken) |
Asynchronously creates a new CommunicationUserIdentifier. |
| CreateUserAndTokenAsync(String, IEnumerable<CommunicationTokenScope>, TimeSpan, CancellationToken) |
Asynchronously creates a new CommunicationUserIdentifier. |
| CreateUserAndTokenAsync(IEnumerable<CommunicationTokenScope>, CancellationToken) |
Asynchronously creates a new CommunicationUserIdentifier. |
| CreateUserAndTokenAsync(IEnumerable<CommunicationTokenScope>, TimeSpan, CancellationToken) |
Asynchronously creates a new CommunicationUserIdentifier. |
CreateUserAndTokenAsync(String, IEnumerable<CommunicationTokenScope>, CancellationToken)
Asynchronously creates a new CommunicationUserIdentifier.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>> CreateUserAndTokenAsync(string customId, System.Collections.Generic.IEnumerable<Azure.Communication.Identity.CommunicationTokenScope> scopes, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateUserAndTokenAsync : string * seq<Azure.Communication.Identity.CommunicationTokenScope> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>>
override this.CreateUserAndTokenAsync : string * seq<Azure.Communication.Identity.CommunicationTokenScope> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>>
Public Overridable Function CreateUserAndTokenAsync (customId As String, scopes As IEnumerable(Of CommunicationTokenScope), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of CommunicationUserIdentifierAndToken))
Parameters
- customId
- String
Custom Id to be associated with the user.
- scopes
- IEnumerable<CommunicationTokenScope>
List of CommunicationTokenScope scopes for the token.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Applies to
CreateUserAndTokenAsync(String, IEnumerable<CommunicationTokenScope>, TimeSpan, CancellationToken)
Asynchronously creates a new CommunicationUserIdentifier.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>> CreateUserAndTokenAsync(string customId, System.Collections.Generic.IEnumerable<Azure.Communication.Identity.CommunicationTokenScope> scopes, TimeSpan tokenExpiresIn, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateUserAndTokenAsync : string * seq<Azure.Communication.Identity.CommunicationTokenScope> * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>>
override this.CreateUserAndTokenAsync : string * seq<Azure.Communication.Identity.CommunicationTokenScope> * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>>
Public Overridable Function CreateUserAndTokenAsync (customId As String, scopes As IEnumerable(Of CommunicationTokenScope), tokenExpiresIn As TimeSpan, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of CommunicationUserIdentifierAndToken))
Parameters
- customId
- String
Custom Id to be associated with the user.
- scopes
- IEnumerable<CommunicationTokenScope>
List of CommunicationTokenScope scopes for the token.
- tokenExpiresIn
- TimeSpan
Custom validity period of the token within [1,24] hours range.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Applies to
CreateUserAndTokenAsync(IEnumerable<CommunicationTokenScope>, CancellationToken)
Asynchronously creates a new CommunicationUserIdentifier.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>> CreateUserAndTokenAsync(System.Collections.Generic.IEnumerable<Azure.Communication.Identity.CommunicationTokenScope> scopes, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateUserAndTokenAsync : seq<Azure.Communication.Identity.CommunicationTokenScope> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>>
override this.CreateUserAndTokenAsync : seq<Azure.Communication.Identity.CommunicationTokenScope> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>>
Public Overridable Function CreateUserAndTokenAsync (scopes As IEnumerable(Of CommunicationTokenScope), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of CommunicationUserIdentifierAndToken))
Parameters
- scopes
- IEnumerable<CommunicationTokenScope>
The scopes that the token should have.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Applies to
CreateUserAndTokenAsync(IEnumerable<CommunicationTokenScope>, TimeSpan, CancellationToken)
Asynchronously creates a new CommunicationUserIdentifier.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>> CreateUserAndTokenAsync(System.Collections.Generic.IEnumerable<Azure.Communication.Identity.CommunicationTokenScope> scopes, TimeSpan tokenExpiresIn, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateUserAndTokenAsync : seq<Azure.Communication.Identity.CommunicationTokenScope> * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>>
override this.CreateUserAndTokenAsync : seq<Azure.Communication.Identity.CommunicationTokenScope> * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Identity.CommunicationUserIdentifierAndToken>>
Public Overridable Function CreateUserAndTokenAsync (scopes As IEnumerable(Of CommunicationTokenScope), tokenExpiresIn As TimeSpan, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of CommunicationUserIdentifierAndToken))
Parameters
- scopes
- IEnumerable<CommunicationTokenScope>
List of CommunicationTokenScope scopes for the token.
- tokenExpiresIn
- TimeSpan
Custom validity period of the token within [1,24] hours range.
- cancellationToken
- CancellationToken
The cancellation token to use.