SharePoint Online身份validation失败

我有一个C#应用程序,它使用Web请求对SharePoint Online进行身份validation。 它适用于我,但其他人收到以下错误:

    S:Sender  wst:FailedAuthentication    Authentication Failure    0x80048821  0x80041034 The specified member name is either invalid or empty.
       

这个错误是什么意思? 我很确定他们输入了正确的用户名和密码。 是否有一个SharePoint Online错误代码列表,我可以找到哪些地方可以帮助我识别问题?

这是我的C#代码:

 var request = (HttpWebRequest)WebRequest.Create(@"https://login.microsoftonline.com/extSTS.srf"); request.AllowAutoRedirect = false; request.ContentType = @"application/json; odata=verbose"; request.CookieContainer = this.CookieContainer; request.Method = @"POST"; request.UserAgent = @"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"; string soapRequest = Strings.SharePointOnlineAuthenticationRequest .Replace(@"$(UserName)", this.UserName) .Replace(@"$(Password)", this.Password) .Replace(@"$(Address)", this.SiteUrl); byte[] contentBytes = new ASCIIEncoding().GetBytes(soapRequest); request.ContentLength = contentBytes.Length; using (var requestStream = request.GetRequestStream()) { requestStream.Write(contentBytes, 0, contentBytes.Length); } 

Strings.SharePointOnlineAuthenticationRequest

这是我发送的SOAP请求。 “$(UserName)”,“$(密码)”和“$(地址)”标记在运行时被替换。

    http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue  http://www.w3.org/2005/08/addressing/anonymous  https://login.microsoftonline.com/extSTS.srf   $(UserName) $(Password)        $(Address)   http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey http://schemas.xmlsoap.org/ws/2005/02/trust/Issue urn:oasis:names:tc:SAML:1.0:assertion     

最近是否更改了用户名,我看到了名称更改后ADFS声明丢失的问题: 请参阅techet文章AD FS 2.0:声明在用户名更改后从输出声明集中丢失