Hi @Morman, Scott ,
Thanks for using Microsoft Q&A !!
No, you cannot get a token without specifying either resource or scope parameters as it is required by OAuth to return a valid token for which you want to use the token. If you are using V1 endpoint https://login.microsoftonline.com/<tenant>/oauth2/token
then you need to provide resource and when using v2 endpoint https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token
then you need to provide a scope. Please refer to the Microsoft identity platform and the OAuth 2.0 client credentials flow for details.
Is there any specific reason you do not want to pass the resource parameter ? Also, what value you are passing as a resource parameter ?
Please pass https://eventhubs.azure.net/
as resource (refer to Authorize access to Event Hubs resources using Azure Active Directory )
Please use https://eventhubs.azure.net/.default
when using scope. (screenshot below)
Please refer to Get an Azure Active Directory (Azure AD) token and use it send events to an event hub for detailed steps.
Thanks
Saurabh