You could try the below
curl --data "client_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=client_credentials&scope=SCOPE_IF_YOU_HAVE" AUTHENTICATION_URL
curl --data "client_id=9######4-####-####-a4c7-############&client_secret=##########&grant_type=client_credentials&scope=api://#####-####-####-####-###########/.default" https://login.microsoftonline.com/########-####-####-####-#########/oauth2/v2.0/token