TeamsUserCredential.GetUserInfoAsync 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.
Get basic information of current Teams user. For example:
var user = await teamsUserCredential.GetUserInfoAsync();
public System.Threading.Tasks.ValueTask<Microsoft.TeamsFx.UserInfo> GetUserInfoAsync ();
member this.GetUserInfoAsync : unit -> System.Threading.Tasks.ValueTask<Microsoft.TeamsFx.UserInfo>
Public Function GetUserInfoAsync () As ValueTask(Of UserInfo)
Returns
Basic user info with user displayName, objectId and preferredUserName.
Exceptions
When runtime is not in browser enviroment.
When SSO token from Teams client is not valid.
When SSO token from Teams client is empty.