You can't use TenantAllowBlockList when connected to Security and Compliance
Hi All,
Recently i was stumbling across a weird behaviour regarding Exchange Online Protection (EOP) with TenantAllowBlockListItems.
Get-TenantAllowBlockListItems
Connect-ExchangeOnline
Get-TenantAllowBlockListItems -ListType Url -Block
Get-TenantAllowBlockListItems -ListType Url -ListSubType AdvancedDelivery
![](https://icewolffile.blob.core.windows.net/$web/202204/ExO_TABL_01.jpg)
![](https://icewolffile.blob.core.windows.net/$web/202204/ExO_TABL_02.jpg)
Represented with the following Command
Get-TenantAllowBlockListItems -ListType Url -Block
![](https://icewolffile.blob.core.windows.net/$web/202204/ExO_TABL_03.jpg)
Advanced Delivery - Represented with the following Command
Get-TenantAllowBlockListItems -ListType Url -ListSubType AdvancedDelivery
![](https://icewolffile.blob.core.windows.net/$web/202204/ExO_TABL_04.jpg)
Then i connected to Security and Compliance
Connect-IPPSSession
Get-TenantAllowBlockListItems -ListType Url
Error:
Das Format des in den Parameter objectId eingegebenen Werts ist ungültig. Prüfen Sie den Wert, und versuchen Sie es erneut.
Parameter name: objectId
+ CategoryInfo : NotSpecified: (:) [Get-TenantAllowBlockListItems], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.Exchange.Management.SystemConfigurationTasks.TenantAllowBlock
List.GetTenantAllowBlockListItems
+ PSComputerName : che01b.ps.compliance.protection.outlook.com
Parameter name: objectId
+ CategoryInfo : NotSpecified: (:) [Get-TenantAllowBlockListItems], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.Exchange.Management.SystemConfigurationTasks.TenantAllowBlock
List.GetTenantAllowBlockListItems
+ PSComputerName : che01b.ps.compliance.protection.outlook.com
Get-TenantAllowBlockListItems -ListType Url -ListSubType AdvancedDelivery
Error:
A parameter cannot be found that matches parameter name 'ListSubType'.
+ CategoryInfo : InvalidArgument: (:) [Get-TenantAllowBlockListItems], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Get-TenantAllowBlockListItems
+ PSComputerName : che01b.ps.compliance.protection.outlook.com
+ CategoryInfo : InvalidArgument: (:) [Get-TenantAllowBlockListItems], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Get-TenantAllowBlockListItems
+ PSComputerName : che01b.ps.compliance.protection.outlook.com
![](https://icewolffile.blob.core.windows.net/$web/202204/ExO_TABL_05.jpg)
As soon as you're connected to https://ps.compliance.protection.outlook.com you will get the above error Messages
Get-PSSession
Get-PSSession | fl
![](https://icewolffile.blob.core.windows.net/$web/202204/ExO_TABL_06.jpg)
Regards
Andres Bohren
![](https://icewolffile.blob.core.windows.net/$web/logos/Exchange_logo.png)