I want to login to access dynamics 365 CRM but the condition is when I login with https://login.microsoftonline.com/common/oauth2/authorize?resource=crmapiurl&client_id&response_type=code&redirect_uri&response_mode=query, I can access the crm but not getting refresh_token when login. I can get access_token & refresh_token if I login with https://login.microsoftonline.com/common/oauth2/v2.0/authorize?scope=crmapiurl/user_impersonation offline_access&client_id&response_type=code&redirect_uri&response_mode=query, but I dont know why I cant access the CRM and getting error 401 Unauthorized. What url should I use to get access_token & refresh_token and the token can use to access the dynamics 365 CRM?