If it is not already registered, you will need to register your application as an Azure Active Directory application to implement an OAuth 2.0 grant flow and run an application against a Dynamics 365 web instance. This process is detailed in "Registering your application on the Azure portal."
To configure the driver for an OAuth 2.0 implementation, you will need client credentials and endpoints related to your registered application, as well as the service URL for your Dynamics 365 web instance. In addition, for the client credentials grant, you must create an application user on your Dynamics 365 web instance. Consult the following topics for details.