How to edit default policy allow the owner of a team to delete messages in Microsoft Teams?
Step 1: Sign into Office 365 admin portal via https://portal.office.com
Step 2: Click on Admin from the left pane and navigate to All admin center > Teams.
Step 3: Click on Org-wide settings on the left pane and then click Guest access.
Step 4: Under Allow guest access in Teams section, select On.
Step 5: Click Save.