Mar 26 2024 12:06 PM
I am trying to disable the "Share this item with other people" feature. Microsoft shows this PowerShell function:
Limit sharing in Microsoft 365 | Microsoft Learn
But I get an error message saying "Attempted to perform an unauthorized operation".
I am a Global Administrator.
Mar 27 2024 02:11 AM
Mar 27 2024 02:51 AM
@xoxidein Check if user account you are using for running the PowerShell commands have enough permissions on the site.
First try using account with SP tenant administrator role on the tenant. If that does not work for you, use account with SP tenant administrator role AND site admin (SCA) permissions on that specific site.
Before running Set-SPOSite command, you have to connect to admin center using Connect-SPOService like:
Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential email address removed for privacy reasons
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.