Esempio n. 1
0
        public static async Task <TokenCredentials> GetMicrosoftGraphTokenCredentialsAsync(
            this IAuthenticationManager authenticationManager,
            CancellationToken cancellationToken = default
            )
        {
            var microsoftGraphAuthenticationResult = await authenticationManager
                                                     .AcquireMicrosoftGraphAuthenticationResultAsync(cancellationToken);

            var microsoftGraphTokenCredentials = authenticationManager
                                                 .GenerateTokenCredentials(microsoftGraphAuthenticationResult);

            return(microsoftGraphTokenCredentials);
        }