2 u012550810 u012550810 于 2017.09.07 16:33 提问

同样的一段获取token的代码发布到Azure上就报错

如下的代码:
var userCredential = new UserCredential("test@microsoft.com");
var redirectUri = new Uri("https://test.com");
var authContext = new AuthenticationContext("https://logi
n.windows.net/microsoft.com/", false);
var authResult = authContext.AcquireTokenAsync("http://aa.com", ClientId, userCredential).Result;
var token = authResult.AccessToken

类似的代码,在本地运行都正常,token都能取到,发不到AZure上一直报错:
Federated service at https://msft.sts.microsoft.com/adfs/services/trust/13/windowstransport returned error: See inner exception for detail.

报错的代码是
var authResult = authContext.AcquireTokenAsync("http://aa.com", ClientId, userCredential).Result

1个回答

caozhy
caozhy   Ds   Rxr 2017.09.07 17:48

你用的是微软的azure还是中国山寨的 azure

Csdn user default icon
上传中...
上传图片
插入图片