Forum Discussion
MutationObserver to modify the SharePoint UI
aymiee You can hide Copy to and Move to options from top command bar using SharePoint JSON formatting: Command bar customization syntax reference
However, you will not be able to remove specific these options from context menu using SharePoint out of the box functionalities.
You have to create SPFx extension (Application customizer) to inject custom CSS for hiding this. However, such DOM manipulation & CSS customization are not recommended by Microsoft and some of your customization may break if Microsoft changes HTML element id/classes in new release updates.
Similar thread: Hide copy link option in context menu
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- ganeshsanapMay 26, 2023MVP
aymiee Then try using SPFx application customizer and custom CSS/JS for hiding it as mentioned in my above response.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.