Debra_P
Requesting the token does not have GraphAPI involved yet, it is the Microsoft's Identity.client package wrapped that token request, so I won't know the https request in details.
If you use Java, I think you can try the library msal4j quickly, (again, this is a working code you can verify it is your code or the AD setup)
I highly recommend you create an Azure developer sandbox, and add configuration for a testing o365, which will significantly cut the development time before you go for your IT admin.
implementation 'com.microsoft.azure:msal4j:1.13.9'
import com.microsoft.aad.msal4j.*;
private String getToken() {
String token = "";
String clientId = "xxxxxxxxxxxxxxxxxxxxx";
String clientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
String tenantId = "xxxxxxxxxxxxxxxxxxxxxxxx";
String authority = "https://login.microsoftonline.com/" + tenantId;
IConfidentialClientApplication app = null;
try {
app = ConfidentialClientApplication
.builder(clientId, ClientCredentialFactory.createFromSecret(clientSecret)).authority(authority)
.build();
} catch (MalformedURLException e) {
e.printStackTrace();
}
Set<String> scopes = Collections.singleton("https://outlook.office365.com/.default");
try {
ClientCredentialParameters parameters = ClientCredentialParameters.builder(scopes).build();
IAuthenticationResult result = app.acquireToken(parameters).get();
// The access token can be obtained from the result
token = result.accessToken();
System.out.println("Access Token: " + token);
} catch (Exception ex) {
System.out.println("Error occurred: " + ex.getMessage());
}
return token;
}