This error occurs when trying to delete a trait or segment in AAM (Adobe Audience Manager). The reason for this error is, because the trait or segment is shared from the Audience Manager to AEP (Adobe Experience Platform).
Below given steps will help resolve the following error: Not allowed to delete due to segment sharing enabled
Follow these steps:
Navigate to the Sources tab in AEP, and open the settings for your Audience Manager source connector:
Uncheck the segment(s) you are attempting to delete from AAM:
Once the segments or traits are unchecked, click Next in the upper right corner. On the resulting page, review your changes and click Finished.
If you are sharing all the segments and traits from AAM to AEP, you would need to update your configuration to share specific segments or stop sharing the data in order to delete your AAM segment.