AnsweredAssumed Answered

Cant access email of portal user arcgis runtime

Question asked by test_di on Jun 24, 2020


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;


// 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