public async Task <byte[]> GetUserPhotoAsync(string mail) { if (!string.IsNullOrEmpty(mail)) { var authToken = Settings.TokenForUser; if (string.IsNullOrEmpty(authToken)) { return(null); } try { UriBuilder builder = new UriBuilder(AppSettings.GraphApiEndpoint); builder.Path = $"beta/users/{mail}/photo/$value"; string uri = builder.ToString(); return(await _requestProvider.GetAsyncContent(uri, authToken)); } catch { return(null); } } return(null); }