SharePoint令牌类型不被允许。

huangapple go评论70阅读模式
英文:

SharePoint Token type is not allowed

问题

我正在尝试使用Gosip包(https://github.com/koltyakov/gosip)进行SharePoint身份验证。我正在使用一个身份验证对象,但每次尝试时都会收到一个错误消息:'{"error":"invalid_request","error_description":"Token type is not allowed."}'

以下是注册新应用程序的步骤:

  1. 使用https://{site}/_layouts/15/AppRegNew.aspx注册新应用程序。
  2. 使用https://{site}/_layouts/15/appinv.aspx为应用程序授予完全权限。

在AppPermissionRequests元素中添加以下内容:


我可以在https://{site}/_layouts/15/appprincipals.aspx中的站点应用程序权限列表中看到该应用程序,但我仍然收到错误消息。

英文:

I am trying to authenticate into SharePoint using Gosip package (https://github.com/koltyakov/gosip). I am using an authentication object but each time I try I get an '{"error":"invalid_request","error_description":"Token type is not allowed."}'

auth := &strategy.AuthCnfg{
    SiteURL:      os.Getenv("SPAUTH_SITEURL"),
    ClientID:     os.Getenv("SPAUTH_CLIENTID"),
    ClientSecret: os.Getenv("SPAUTH_CLIENTSECRET"),
}

I have registered the new app using https://{site}/_layouts/15/AppRegNew.aspx and given full permission to the app using https://{site}/_layouts/15/appinv.aspx

 <AppPermissionRequests AllowAppOnlyPolicy="true">
   <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" 
   Right="FullControl" />
 </AppPermissionRequests>

I can likewise see the app is available in Site App Permission list using https://{site}/_layouts/15/appprincipals.aspx but I keep getting the error.

答案1

得分: 0

类似的问题之前发生过,你可以尝试查看这个链接,看看是否对你的情况有帮助。

链接:类似问题

英文:

similar issue have happened before, you can try to see if this helps your situation.

huangapple
  • 本文由 发表于 2023年3月23日 04:35:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/75817039.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定