Facing : Ex6F9304|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|The operation couldn't be performed because object 'abc@jitter.com' couldn't be found on 'CY4PR15A005DC12.NAMPR15A005.PROD.OUTLOOK.COM

Vinay Sharma 56 Reputation points
2022-09-29T14:47:30.677+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.

When following : Register service principals in Exchange

I trying to execute below command :

Add-MailboxPermission -Identity "john.smith@contoso.com" -User 
Microsoft Exchange Online
{count} votes

3 answers

Sort by: Most helpful
  1. Vasil Michev 110.3K Reputation points MVP
    2022-09-29T16:57:37.073+00:00

    Is "john.smith@Company portal .com" a valid mailbox within your Office 365 tenant? What does Get-Recipient "john.smith@Company portal .com" show?

    0 comments No comments

  2. KyleXu-MSFT 26,281 Reputation points
    2022-09-30T01:48:32.543+00:00

    @Vinay Sharma

    Two thing you need to pay attentions to:
    246239-1.png

    You need to connect to Exchange online module with tenant admin account with have permission to find this mailbox and add permission it:

    Use command below to check whether could find this mailbox first as michev said:

    Get-Mailbox mymail@jitter.com  
    

    Then check whether this account has permission to run Add-MailboxPermission command (Tested with another user mailbox first):

    Add-MailboxPermission -Identity "mymail@jitter.com" -User "anotherUserMailbox" -AccessRights FullAccess   
    

    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.


    0 comments No comments

  3. Laszlo Olasz 0 Reputation points
    2023-11-07T19:40:49.3666667+00:00

    Anyone know how to supress these errors in Azure Automation runbook ?

    It looks like they are being written to Output window, even if you catch them, out-null them, save them in your own ErrorVariable ... they just keep showing nevertheless as Output stream.

    0 comments No comments

Your answer

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