Getting error while activating Azure RMS for integrating with purview sensitivity labels encryption settings

Purview Engineer 0 Reputation points
2026-08-06T05:40:26.1333333+00:00

Getting error while activating Azure RMS for integrating with purview sensitivity labels encryption settings, I am getting error at Connect-AipService

Connect-AipService: The attempt to connect to the Azure Information Protection service failed. Verify that the credentials you are using are correct and try again. If you have continued problems, see ttp://go.microsoft.com/fwlink/?LinkId-251909. The correlation ID is 7758872a-673a-43ed-a01a-0912e08001a4. 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.ConnectAipServic eCommand`

Why am i constantly getting this error, i already tried with five different gloval admin accounts and with 3-4 different machines as well, tried in powershell as well cloud shell, also tried enabling it through Set-IRMConfiguration -InternalLicensingEnabled $true

But still no luck.

Azure Information Protection
Azure Information Protection

An Azure service that is used to control and help secure email, documents, and sensitive data that are shared outside the company.

0 comments No comments

2 answers

Sort by: Newest
  1. Peram Venkateswara Reddy 260 Reputation points Microsoft External Staff Moderator
    2026-08-07T09:35:34.4266667+00:00

    Hi @Purview Engineer ,

    You've already ruled out the usual first answers — five admin accounts, 3–4 machines, both PowerShell and Cloud Shell — so let me skip those and focus on what a failure that's identical across all of them points to.

    First, one thing to check before anything else

    Do you have AD RMS deployed on-premises? If so, stop — the documentation is explicit: "Do not activate the Azure Rights Management service if you have Active Directory Rights Management Services (AD RMS) deployed for your organization." There's a separate migration path.

    Your error is not the Cloud Shell / PowerShell 7 error.

    Worth clearing up, since that's the standard first suggestion. Cloud Shell genuinely can't run this — AIPService needs Windows PowerShell 5.1 and the full .NET Framework — but it fails with a distinctive message:

    the module could not be loaded due to the following error:
    [Could not load file or assembly 'System.Web.Services, Version=4.0.0.0...']
    

    Yours is ApplicationFailedException from ConnectAipServiceCommand, meaning the module loaded and authentication failed. So on your Windows machines the version isn't the problem. Just confirm with $PSVersionTable.PSVersion that you're on 5.1 (not 7, not ISE) and move on.

    Most likely cause #1 — the role, not the account

    Five Global Admins failing identically is a systematic condition, not five credential problems. And Global Admin may not be the role being checked. The activation documentation says:

    "Run Connect-AipService and sign in with a role that has permissions to activate the Azure Rights Management service for your tenant. For example, the compliance administrator role, or compliance data administrator role."

    Check whether any of your five accounts hold Compliance Administrator or Compliance Data Administrator as an active assignment. If your tenant uses PIM, an eligible-but-not-activated role won't work — activate it first, then retry.

    Most likely cause #2 — TLS inspection on your network

    This is my strongest candidate for a failure that reproduces on every machine. Required endpoints:

    • *.aadrm.com
    • *.cloudapp.net (specifically rmsoprod*-b-rms*.cloudapp.net)
    • Outbound TCP 443

    But open ports aren't sufficient. Connection fails if HTTPS traffic is blocked, TLS inspection is enabled, or proxy authentication breaks certificate pinning. A corporate proxy doing SSL inspection on *.aadrm.com breaks this identically on every machine and for every account — which matches your symptoms exactly.

    Test this decisively: run Connect-AipService from a Windows machine on a completely different network — a mobile hotspot, or a home connection off the corporate VPN. If it succeeds there, it's TLS inspection/proxy, and the fix is a bypass rule for those endpoints.

    One preemptive note: *.aadrm.com and *.cloudapp.net are not pingable by design. ICMP isn't required and ping failure alone doesn't indicate a problem — don't let that mislead your network team.

    About the Set-IRMConfiguration attempt

    That's the wrong lever, and it's worth knowing why. Set-IRMConfiguration -InternalLicensingEnabled $true configures Exchange Online IRM; it doesn't activate the tenant RMS service. Activation is Enable-AipService, and IRM settings largely auto-configure once RMS is active.

    That said, it gives you a useful read on tenant state without needing Connect-AipService to succeed:

    Connect-ExchangeOnline
    Get-IRMConfiguration
    Test-IRMConfiguration -Sender <your-address>
    

    If you see InternalLicensingEnabled: False, AzureRMSLicensingEnabled: False, and an empty LicensingLocation, that confirms RMS was never activated at the tenant level. Test-IRMConfiguration will also flag licensing gaps — watch for a missing BPOS_S_Enterprise capability, which blocks encryption features regardless of everything above.

    Also check whether you need to activate at all

    "If your subscription... was obtained towards the end of February 2018 or later: The service is automatically activated for you."

    If your tenant is post-Feb-2018, RMS should already be on unless someone deactivated it. Get-AipService returning Enabled means you're done and the real issue is elsewhere in your label configuration.

    References

    Kind Regards,
    Microsoft Support Team.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-08-06T05:40:41.43+00:00

    The most likely cause is PowerShell 7. Connect-AipService can fail with:

    • The attempt to connect to the Azure Information Protection service failed...
    • Object reference not set to an instance of an object

    when it is run in Windows PowerShell 7. The supported version called out for this scenario is Windows PowerShell 5.

    Use this checklist:

    1. Check the PowerShell version:
         $PSVersionTable.PSVersion
      
      If it shows PowerShell 7, switch to Windows PowerShell 5.
    2. Run Connect-AipService again from Windows PowerShell 5.
    3. Verify the sign-in account can access the tenant by signing in to the Office 365 portal.
    4. Confirm the account is a Global Administrator.
    5. Confirm the tenant has a subscription that includes Azure Information Protection.
    6. Verify network requirements are met:
      • 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
    7. If Azure Information Protection is not enabled for the company, enable it from the Microsoft 365 admin center.

    Since multiple global admin accounts and multiple machines were already tried, the highest-value check is the PowerShell version first. A matching Microsoft Q&A case for this exact symptom was resolved by switching from PowerShell 7 to PowerShell 5.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.