首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Fedauth,rtfa cookie未在响应sharepoint online auth中找到

Fedauth,rtfa cookie未在响应sharepoint online auth中找到
EN

Stack Overflow用户
提问于 2022-03-10 11:17:42
回答 1查看 649关注 0票数 0

我们正在尝试从sharepoint online获取访问令牌。

使用这个postman调用窗体/default.aspx?wa=wsignin1.0 1.0

但是在return.only中却没有得到fedauth和rtfa cookie,得到了conext响应cookie。按照这个链接给邮递员打电话。有谁面临同样的问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-11 03:30:38

首先,您需要获得一个二进制安全令牌,您需要使用Microsoft安全令牌服务,请输入以下URL:

代码语言:javascript
运行
复制
https://login.microsoftonline.com/extSTS.srf

然后,需要添加以下XML信封作为消息体,将用户名、密码和您的域替换为您的data.Please集合内容-类型到应用程序/x form-urlencoded在请求头中编码。

代码语言:javascript
运行
复制
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
      xmlns:a="http://www.w3.org/2005/08/addressing"
      xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  <s:Header>
    <a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action>
    <a:ReplyTo>
      <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
    </a:ReplyTo>
    <a:To s:mustUnderstand="1">https://login.microsoftonline.com/extSTS.srf</a:To>
    <o:Security s:mustUnderstand="1"
       xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <o:UsernameToken>
        <o:Username>[username]@[YourDomain].onmicrosoft.com</o:Username>
        <o:Password>[Password]</o:Password>
      </o:UsernameToken>
    </o:Security>
  </s:Header>
  <s:Body>
    <t:RequestSecurityToken xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">
      <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
        <a:EndpointReference>
          <a:Address>https://[yourdomain].sharepoint.com/</a:Address>
        </a:EndpointReference>
      </wsp:AppliesTo>
      <t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey</t:KeyType>
      <t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>
      <t:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType>
    </t:RequestSecurityToken>
  </s:Body>
</s:Envelope>

在返回请求中,您将得到"BinarySecurityToken",请复制它并将其添加到"body".you可以向以下URL发送一个POST请求,最后您将得到fedauth和rtfa。

代码语言:javascript
运行
复制
https://[YourDomain].sharepoint.com/_forms/default.aspx?wa=wsignin1.0

下面是一些你可以参考的截图:

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71423224

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档