Facing : Connect-ExchangeOnline: A parameter cannot be found that matches parameter name 'Organization'.

Vinay Sharma 56 Reputation points
2022-09-15T13:18:46.527+00:00

Hi all,
I tried following the document: https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth but unable to get through this step: https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#register-service-principals-in-exchange.
I am facing Connect-ExchangeOnline: A parameter cannot be found that matches parameter name 'Organization'. while running the command (Connect-ExchangeOnline -Organization <mytenantId>) in Powershell as described in above OAuth documentation.

Below is the screenshot.
241531-image.png

If anyone in your known has knowledge about it, please guide me through.

Exchange | Exchange Server | Development
Exchange | Exchange Server | Management
Exchange | Exchange Server | Management
The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
Windows for business | Windows Server | User experience | PowerShell
{count} votes

2 answers

Sort by: Most helpful
  1. Andy David - MVP 159.7K Reputation points MVP Volunteer Moderator
    2022-09-15T13:24:28.127+00:00

    https://learn.microsoft.com/en-us/powershell/module/exchange/connect-exchangeonline?view=exchange-ps

    that switch is only used for CBA and requires the onmicrosoft.com domain name, not the TenantID:

    241513-image.png


  2. KyleXu-MSFT 26,396 Reputation points
    2022-09-16T01:54:57.01+00:00

    @Vinay Sharma

    First, find you tenant ID follow this article: Find tenant ID through the Azure portal

    Install Exchange online Module and connect to Exchange online from Windows PowerShell:
    241703-1.png

    I am using V2 module 2.0.6, there doesn't exist any issue with it.


    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.