How to create an Aspose IGraphClient for fetching messages on-behalf-from-user from Microsoft Graph?

66 Views Asked by At

Im trying to fetch messages on-behalf-from-user from Graph. I'm able to create a client using the usual Microsoft Graph, but i just cant get it to work with Asposes version, IGraphClient. How do i gain access on behalf??

Below is how i create a Microsoft Graph Client, it works, but i need the Aspose version of IGraphClient.

            var tenantId = tenantID;
            var clientId = clientID;
            var clientSecret = secret;

            var options = new TokenCredentialOptions
            {
                AuthorityHost = AzureAuthorityHosts.AzurePublicCloud
            };

            var clientSecretCredential = new ClientSecretCredential(
                tenantId, clientId, clientSecret, options);

            var client = new GraphServiceClient(clientSecretCredential);            
0

There are 0 best solutions below