ERROR_IPSEC_MM_POLICY_IN_USE - 13005 (0x32CD)

The specified main mode policy is being used.

Updated: Feb 21, 2026

Technical Meaning

The error code ERROR_IPSEC_MM_POLICY_IN_USE indicates that a main mode security policy, which is part of the Internet Protocol Security (IPsec) framework, cannot be modified or deleted because it is currently in use by an active security association. This means that there are ongoing IPsec sessions or configurations utilizing this specific policy.

Error Details

The error ERROR_IPSEC_MM_POLICY_IN_USE is a specific error code used within the Windows operating system to notify applications and developers about the state of IPsec policies. It signifies that any attempt to change, delete, or modify an active main mode security policy will result in this error being returned.

Usage Context

This error typically occurs when attempting to manage IPsec policies using the Windows API functions such as IpsecMainModePolicyDelete or IpsecMainModePolicyModify. The presence of an active security association that relies on a particular main mode policy prevents any changes from being made until all associated sessions are terminated.

Developer Interpretation

Developers should interpret this error code to mean that the specified IPsec main mode policy is in use and cannot be altered. This state can occur due to ongoing IPsec sessions or configurations that depend on the policy. Developers must ensure that any changes to IPsec policies are made when no active associations exist.

Related Errors

  • ERROR_IPSEC_MM_POLICY_NOT_FOUND (13004, 0x32C8): Indicates that a specified main mode policy does not exist.
  • ERROR_IPSEC_MM_POLICY_IN_USE (13005, 0x32CD): Indicates that the specified main mode policy is in use and cannot be modified or deleted.

FAQ

Q: What causes this error?

A: This error occurs when an attempt is made to modify a main mode security policy that is currently in use by active IPsec sessions. The policy must not be used before making any changes.

Q: How can I resolve this issue?

A: Ensure that all active IPsec sessions are terminated before attempting to modify or delete the policy. Once all associated sessions are closed, you should be able to make the necessary changes without encountering this error.

Summary

The ERROR_IPSEC_MM_POLICY_IN_USE error code is a specific indication within the Windows operating system that a main mode security policy cannot be modified because it is in use by active IPsec sessions. Developers must ensure that any modifications are made only when no active associations exist to avoid this error.