public async Task <IActionResult> GetOrCreateVerificationProfileAsync() { var userPrincipalName = _getUserUniqueId(); try { var result = await _persistantStorageService.GetSpeakerProfileAsync(userPrincipalName, SpeakerProfileType.Verification); if (result.IsNullOrEmpty()) { result = await _speakerRecognitionClient.CreateVerificationProfileAsync(); await _persistantStorageService.CreateSpeakerProfileAsync(userPrincipalName, SpeakerProfileType.Verification, result); } return(Ok(result)); } catch (HttpException e) { return(StatusCode(e.StatusCode, e.Message)); } }