Working with ApplicationAccessPolicy

Han Tang 20 Reputation points
2023-05-10T00:49:42.9366667+00:00

Hi,

I am working on setting an ApplicationAccessPolicy to limit the API access to a single mailbox. I am trying to see what policy already exist so I ran Get-ApplicationAccessPolicy and it return me an error message.

Ex6F9304|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|The operation couldn't be performed because object 'OU=<domain>.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=CANPR02B022,DC=PROD,DC=OUTLOOK,DC=COM*' couldn't be found on 'YT1PR01A21DC002.CANPR02B022.PROD.OUTLOOK.COM'.

I ran Get-OrganizationUnit cmdlet and it shows the DistinguishedName and OriginatingServer matches what it says it can't find.

Can anyone let me know why server throw me the error?

Thanks,

HT

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,185 questions
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Kael Yao 37,746 Reputation points Moderator
    2023-05-10T05:22:35.1533333+00:00

    Hi @Han Tang,

    This error message may indicate currently there are no application access policies in your tenant.

    I tested in my tenant and it returns the same error.

    You can also refer to the discussion here: EXOApplicationAccessPolicy “Object couldn’t be found on the child domain.”


    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.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Andy David - MVP 157.8K Reputation points MVP Volunteer Moderator
    2023-05-10T11:45:15.8466667+00:00

    instead of using ApplicationAccessPolicy, I would move to the newer RBAC which will replace it;

    https://techcommunity.microsoft.com/t5/exchange-team-blog/announcing-public-preview-of-role-based-access-control-for/ba-p/3688228

    1 person found this answer helpful.

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.