Hi @Biswajeet Pruseth ,
Thanks for using Microsoft Q&A forum and posting your query.
Since you have confirmed that you have already followed all the steps mentioned in the document, if yours is a new O365 tenant, then I suspect that your issue could be related to this post: SharePoint Online authorization issue 'Token type is not allowed'
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
.
Run the following commands on PowerShell.
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
$adminUPN="<the full 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 $adminUPN -Message "Type the password."
Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential
set-spotenant -DisableCustomAppAuthentication $false
Please note:
- Fill in the values for the $adminUPN and $orgName variables (replacing all the text between the quotes, including the < and > characters), and then run the following commands at the SharePoint Online Management Shell command prompt:
- When prompted with the Windows PowerShell credential request dialog box, type the password for the SharePoint admin account.
- Afterward, run https://xxxx-admin.sharepoint.com/_layouts/15/appinv.aspx to grant permission
- Generate new token and CRUD operations using REST API on SharePoint should be working by now.
Additional link: https://learn.microsoft.com/powershell/sharepoint/sharepoint-online/connect-sharepoint-online?view=sharepoint-ps
Also I would recommend you to please test connection using POSTMAN before testing it in ADF linked service to make sure that the necessary connection configurations are properly configured in Sharepoint side.
Hope this info helps. Do let us know how it goes.
----------
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
- Want a reminder to come back and check responses? Here is how to subscribe to a notification.