Token type is not allowed Error While using Client Id Client Secret
When you are using Client Id and Client Secret first time you might get this below error {"error":"invalid_request","error_description":"Token type is not allowed."} Reason : For new SharePoint subscription Grant App Permission is disabled by default or the browser link https://xxxx-admin.sharepoint.com/_layouts/15/appinv.aspx is disabled . To enable this feature, we need to connect to SharePoint using Windows PowerShell and then run set-spotenant -DisableCustomAppAuthentication $false Open Windows power shell > Run below scripts Install - Module - Name Microsoft . Online . SharePoint . PowerShell $adminUPN = "<Email address of a SharePoint administrator account, example: jdoe@contosotoycompany.onmicrosoft.com>" $orgName = "<name of your Office 365 organization, example: contosotoycompany>" $userCredential = Get - Credential - UserName ...