I registered an app in Azure Active Directory and granted several privileges:
Then I got myself a bearer token by calling:
https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
with the scope:
https://{tenantName}.sharepoint.com/.default
When I use that token to make an API call like:
https://infoinnobake.sharepoint.com/_api/search/query?querytext='contentclass:STS_Site contentclass:SP.Webb'&selectproperties='Title,Path'&rowlimit=500`
I only reveice 401 Unsupported app only token.
can some explain why?
Is it possible to access the SharePoint online API with an registered App on Azure AD?