In attempting to authenticate with Active Directory to retrieve an access token, I followed the following steps:
1 - Created an application in Azure using the following directions (step 3): https://github.com/Azure-Samples/active-directory-java-native-headless#step-3--register-the-sample-with-your-azure-active-directory-tenant
2 - Created a "Azure Active Directory" user account with the "Data Factory Contributor" permission.
3 - Used the steps from (url below), I followed the example code to attempt to retrieve an access token: https://github.com/Azure-Samples/active-directory-java-native-headless/blob/master/src/main/java/PublicClient.java
Note: the resource I am using is... https://management.core.windows.net/
... using the following as an example: https://docs.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-rest-api#authenticate-with-azure-ad
4 - Server is responding with the following error:
Exception in thread "main" java.util.concurrent.ExecutionException:
com.microsoft.aad.adal4j.AuthenticationException:
{
"error_description": "AADSTS65001: The user or administrator has not
consented to use the application with ID '<my-app-id>' named
'<my-app-name>'. Send an interactive authorization request for this
user and resource.\r\nTrace ID: d0af56e6-aaa3-4d25-b23b-
2984ed2b4400\r\nCorrelation ID: 2422cc2f-1cdd-45c5-8b7c-
46b1eee4ffae\r\nTimestamp: 2019-03-22 04:58:16Z",
"error": "invalid_grant"
}
What grants are required in order to get the authentication to work?

