I want to generate an online event using Microsoft graph API.
I have office 365 subscription
I have registered an application in Azure AD with account type " Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)"
Not provided any redirect URL while configuration
I have given both delegated and application permissions for the application of Calendars.ReadWrite and have provided Admin consent.
Maven Dependencies
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>msal4j</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.8.0-beta4</version>
</dependency>
<dependency>
<groupId>com.microsoft.graph</groupId>
<artifactId>microsoft-graph</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.graph</groupId>
<artifactId>microsoft-graph-core</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.graph</groupId>
<artifactId>microsoft-graph-auth</artifactId>
<version>0.2.0-SNAPSHOT</version>
</dependency>
I am using ClientCredentialProvider to create an auth provider. But whenever I am trying to create an event am getting "OrganizationFromTenantGuidNotFound"
ClientCredentialProvider authProvider = new ClientCredentialProvider(
CLIENT_ID,
Arrays.asList("https://graph.microsoft.com/.default"),
CLIENT_SECRET,
"938db5c8-e2ce-3c76-bad7-1e00cf87b779",
NationalCloud.Global
);
Please find the stack trace here
Please help!