Hello Usha,
When attempting to connect to Microsoft Dynamics 365, if you receive a null token, there is a problem with the authentication procedure. The following are some potential causes and remedies:
Check that you submitted the right client credentials (client ID and client secret) when you requested a token.
The token might have run out of time if it returns null or with an error. Repeat the authentication procedure to request a new token.
Make sure you're using the appropriate authentication process based on the OAuth 2.0 grant type you choose when registering your application.
Verify whether the registered application has the right access rights to the Dynamics 365 API.
Verify that your application can connect to the Dynamics 365 server without being hindered by network or firewall constraints.
You can also visit the Microsoft documentation