certificate-based authentication issue with Start-ComplianceSearch in Exchange Online PowerShell

D3 Support 20 Reputation points
2024-11-13T05:33:14.1366667+00:00

We are experiencing multiple issues with specific compliance search cmdlets in the Exchange Online PowerShell module, particularly Start-ComplianceSearch, Get-ComplianceSearchAction -Identity "test", and New-ComplianceSearchAction -SearchName "test1" -preview, New-ComplianceSearchAction -SearchName "test2" -purge and Release-QuarantineMessage -Confirm:$false. Below are the details of the setup and issues: Setup and Permissions: We are connecting using Connect-IPPSSession with certificate-based authentication: Connect-IPPSSession -Certificate $x509Cert -AppId $clientId -Organization $organization. We created an application in Azure. I have also assigned Global Administrator permissions to the application. The application has also been granted all required API permissions for Office 365 Exchange Online, including permissions like Exchange.ManageAsApp, Mail.Read, and others relevant to compliance tasks. Despite these permissions, we are still encountering issues with Start-ComplianceSearch, Get-ComplianceSearchAction, New-ComplianceSearchAction and Release-QuarantineMessage -Confirm:$false. The New-ComplianceSearch and Get-ComplianceSearch cmdlets execute without any issues. Get-ComplianceSearchAction functions properly without specifying an identity parameter. How to assign the purge, preview or compliance search role to the certificated-based application in Azure?

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
Community Center Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2024-11-13T08:25:53.59+00:00

    There's a known issue with CBA and some "compliance" cmdlets as mentioned in the official documentation: https://learn.microsoft.com/en-us/powershell/exchange/app-only-auth-powershell-v2?view=exchange-ps

    If you need access to those, don't use CBA/unattended login.

    0 comments No comments

0 additional answers

Sort by: Most 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.