That error typically means that you don't have access to the URL https://dataservice.protection.outlook.com or how it is in the documentation: https://*.protection.outlook.com
You will need to check that and make sure you have connectivity, so make sure that you have the required AIP URLs allowed in your firewall. If you have SSL inspection it could be for that reason.
These URLs need to be allowed over HTTPS (port 443):
- *.aadrm.com
- *.azurerms.com
- *.informationprotection.azure.com
- informationprotection.hosting.portal.azure.net
- *.aria.microsoft.com
- *.protection.outlook.com
In addition, I would recommend checking the AD application settings and validating if the API permissions are set correctly. https://learn.microsoft.com/en-us/azure/information-protection/rms-client/clientv2-admin-guide-powershell#create-and-configure-azure-ad-applications-for-set-aipauthentication
Can you confirm if you are running Windows Server 2022? I have seen some customers facing issues with Windows Server 2022. While it does support the AIP scanner, there could be a configuration that is different. I have seen some customers who were able to resolve that error by switching to Windows Server 2019 and updating the registry as described here , and this could be a way to isolate the issue.
If the information helped you, please Accept the answer. This will help us as well as others in the community who may have similar questions. Otherwise let me know if you have further questions.