Cant access email of portal user arcgis runtime sdk.net

438
0
06-24-2020 01:22 AM
testdisha
New Contributor

Hello,

I am trying to access email of logged in user from the PortalUser property from AGOL in my xamarin forms application but its value is null unlike other properties. Sample code:


OAuthTokenCredential credential =
await AuthenticationManager.Current.GenerateCredentialAsync(new Uri(Configuration.ArcGISOnlineUrl), new GenerateTokenOptions
{
TokenValidity = -1
}) as OAuthTokenCredential;

AuthenticationManager.Current.AddCredential(credential);

// Create connection to Portal and provide credential
ArcGISPortal portal =
await ArcGISPortal.CreateAsync(new Uri(Configuration.ArcGISOnlineUrl), credential);

string email = portal.User.Email

Here email is returned null unlike other properties from portal.User like the following screenshot

0 Kudos
0 Replies