Jul 06 2023 03:31 AM
Jul 06 2023 03:31 AM
Hello, I have just set up our company communication sharepoint site where users can access various document libraries from the landing page. Different departments have different permissions. When a member without permission clicks on a button to go to the dedicated library it displays 'Something went wrong, Cannot read properties of undefined (reading 'catch') with a retry button'. Is there a way of changing that so it just says 'access denied' or 'you don't have permission to view this library' rather than an error message? Obviously the retry button isn't going to do anything to assist the user. Help appreciated, pretty new to this.
Jul 06 2023 05:19 AM
In SharePoint Online, you can customize the error message that appears when a user does not have permission to access a specific library. By default, SharePoint displays a generic error message, but you can modify it to provide a more informative and user-friendly message.
To customize the error message in SharePoint Online, follow these steps:
Now, when a user without permission clicks on the button, they will see a custom error message like "Access denied" or "You don't have permission to view this library" instead of the generic error message. This helps provide more clarity to users who do not have the necessary permissions.
Please note that the above steps require the SharePoint Server Publishing Infrastructure and SharePoint Server Publishing features to be enabled. Additionally, customization options may vary depending on the specific version and configuration of SharePoint Online in your organization.
The text and the steps were created with the help of AI.
My answer is voluntary and without guarantee.
Hope this will help you.
Jul 06 2023 06:04 AM
Many thanks @NikolinoDE
I can see the Activate button for 'Sharepoint server publishing infrastructure' however when I click it, it goes to a 'sorry, something went wrong' page
Jul 06 2023 06:20 AM
@DonnaTPerega Are you using communication site template? If yes, you will not be able to activate SharePoint Server Publishing features.
Also, by default you should see access denied message if user does not have access to library. As you are getting some random and weird error message, I will suggest you to raise a support ticket with Microsoft directly and report this behavior. Follow: Get M365 support - online support
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.
Jul 06 2023 07:04 AM