I am trying to use lists SharePoint API https://xx.sharepoint.com/_api/web/lists
I am getting "Unsupported app only token" error when I try to access above API. I have referred to the documentation referred in this answer. I have added certificate on the registered app as well but still I am getting the same error. I am fetching SharePoint token as
URL "https://login.microsoftonline.com/xx.onmicrosoft.com/oauth2/v2.0/token"
Body
- "grant_type" -> "client_credentials"
- "scope" -> "https://xx.sharepoint.com/.default"
- client_id -> client id of the app
- client_secret -> client secret of the app