@Chowdhri, Bhushan (WM Technology) - Thanks for the question and using MS Q&A platform.
According to the Connect-AipService document:
The Connect-AipService cmdlet connects you to Azure Information Protection so that you can then run administrative commands for the protection service for your tenant. This cmdlet can also be used by a partner company that manages your tenant.
You must run this cmdlet before you can run the other cmdlets in this module.
To connect to Azure Information Protection, use an account that is one of the following:
- A global admin for your Office 365 tenant.
- A global administrator for your Azure AD tenant. However, this account cannot be a Microsoft account (MSA) or from another Azure tenant.
- A user account from your tenant that has been granted administrative rights to Azure Information Protection by using the Add-AipServiceRoleBasedAdministrator cmdlet.
- An Azure AD admin role of Azure Information Protection administrator, Compliance administrator, or Compliance data administrator.
According to the official documentation: Unable to connect to Azure Information Protection using Windows PowerShell
Symptoms: When you try to connect to Microsoft Azure Information Protection using Windows PowerShell in Microsoft Office 365, you get an error message that resembles the following:
PS C:\> Connect-AipService
Connect-AipService : The attempt to connect to the Azure Information Protection service failed. Verify that the user name and password you are using are correct and try again. If you have continued problems, see http://go.microsoft.com/fwlink/?LinkId=251909.
The correlation ID is 1df4c755-f859-4284-907b-be5d2a551260. Please note and provide this value if asked by support for it.
At line:1 char:1
+ Connect-AipService
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-AipService], ApplicationFailedException
+ FullyQualifiedErrorId : NotSpecified,Microsoft.RightsManagementServices.Online.Admin.PowerShell.ConnectAipServiceCommand
Cause:
This issue occurs if one or more of the following conditions are true:
- You entered the wrong user name or password.
- You aren't a company administrator.
- You don't have a subscription that includes Azure Information Protection.
- The network is preventing you from connecting to Azure Information Protection.
- You're using Windows PowerShell 7. Using PowerShell 7 will result in the "Object reference not set to an instance of an object" error. For more information, see Known issues - Azure Information Protection.
Resolution:
To resolve this issue, make sure that the following are true:
- Make sure that you enter the correct user name and password. To check that you entered them correctly, sign in to the Office 365 portal.
- You must be a global administrator to connect to Azure Information Protection.
- To use Azure Information Protection, you must have a subscription that includes Azure Information Protection.
- Work with the network administrator to make sure that the network meets the requirements for connecting to Azure Information Protection. The requirements are as follows:
- Incoming and outgoing connections to
*.aadrm.com
are enabled.- Incoming and outgoing connections to
*.cloudapp.net
(rmsoprod*-b-rms*.cloudapp.net
) are enabled.- Port 443 is open.
- Use Windows PowerShell 5. You can check the PowerShell version by using the
$PSVersionTable.PSVersion
command.
- Incoming and outgoing connections to
- Incoming and outgoing connections to
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.