How to connect Exchange Online PowerShell using modern authentication via C# Object Model

Prashanth Reddy 1 Reputation point
2022-02-01T16:37:18.887+00:00

Currently we are using the WSManConnectionInfo class for the basic authentication, for the same class we also have the another constructor using thumbprint.
But there is no provision to provide the app id along with thumbprint to create the connection.

Can you please help me to How to connect Exchange Online using power shell scripts via C# object model with modern certificate based authentication.

Exchange Online
Exchange Online
A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Exchange | Exchange Server | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Aaron Xue-MSFT 2,601 Reputation points Moderator
    2022-02-02T05:22:43.647+00:00

    Hi @Prashanth Reddy ,

    Glad to hear that your issue has been solved and thanks for your sharing.

    According to the latest policy, sorry for that you could not mark your answer as the best answer.
    https://learn.microsoft.com/en-us/answers/support/accepted-answers
    170280-5.png
    I will convert you answer as a comment and you could mark this current reply as the answer.

    This will make answer searching in the forum easier and be beneficial to other community members as well.

    Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.