When I try to run "Get-DlpSensitiveInformationTypeRulePackage" in powershell, I'm getting the below error:
PS C:\Powershell> Get-DlpSensitiveInformationTypeRulePackage
This command is only allowed to run in Exchange Online Protection environment.
+ CategoryInfo : NotSpecified: (:) [Get-DlpSensitiv...TypeRulePackage], ErrorOnlyAllowInEopException
+ FullyQualifiedErrorId : [Server=KL1PR03MB1462,RequestId=5d308fdf-ae6d-4a3d-8c59-f5492c999201,TimeStamp=12-10-2018 08:01:23] [FailureCategory=Cmdlet-ErrorOnlyAllowInEopException] 55635B
18,Microsoft.Office.CompliancePolicy.Tasks.GetDlpSensitiveInformationTypeRulePackage
+ PSComputerName : outlook.office365.com
We have Exchange online protection in our environment.
I have Office 365 E5 license and I'm able to access security & compliance centre in portal. I'm able to run mailbox, msol cmdlets in powershell. Only for this DLP cmdlet I'm getting error.