Home  >  Article  >  Backend Development  >  SharePoint token type not allowed

SharePoint token type not allowed

王林
王林forward
2024-02-06 08:50:12461browse

不允许使用 SharePoint 令牌类型

Question content

I am trying to authenticate to sharepoint using the gosip package (https://github.com/koltyakov/gosip). I'm using an authentication object but every time I try I get '{"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 a new app using https://{site}/_layouts/15/appregnew.aspx and granted full permissions to the app using https://{site}/_layouts/15/appinv.aspx p>

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

I can similarly see the app available in the site app permissions list using https://{site}/_layouts/15/appprincipals.aspx, but I keep getting the error message.


Correct answer


Similar questionHas happened before, you can try to see if this helps in your case.

The above is the detailed content of SharePoint token type not allowed. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete