Short Scenrario: A muti tenant front end javascript (React.JS) Web Application calls a multi tenant ASP.NET Core 2.2 WebAPI from the browser.
Au
I got this error too using client_credentials type to get access_token to call that API even though I granted all Microsoft Graph API and AAD API application related permissions. It is really weird. However , using password flow to get access token under Azure AD admin account will be able to call this API successfully :
Update
You could get your client id and client secret by below steps
azure portal on azure active directory menu see the screen
hot below:azure active directory you would see App
registrations click on that. Then select your application. See the below pictureclient id, tenant id and
client secret which marked on the screen shot below:If you still have any concern please feel free to share. Thank you and happy coding!