If your school wants to turn on parent and guardian access for OneNote Class Notebooks, then Sharing with anonymous users should be turned on for SharePoint Online.
Note: The links generated for OneNote Class Notebooks are view only anonymous guest links.
SharePoint Online has both global (tenant-wide) and site collection settings for external sharing. The tenant-level settings override any settings at the site collection level. For setting up Sharing with anonymous users, both global and site collection settings has to be turned on. See Turn external sharing on or off for SharePoint Online.
Turn on external Sharing for Teams Sites
For O365 group sites (including Microsoft Teams), the sites are not listed in the SharePoint Admin Center, Site Management. Thus, the SharePoint Online Management Shell should be used to run Set-SPOSite.
It would be used to change the sharing status of the group site collection to allow sharing with all external users, and by using anonymous access links. See Set-SPOSite.
Set-SPOSite -Identity https://contososdorg.sharepoint.com/sites/Section_1657 -SharingCapability ExternalUserAndGuestSharing
Enable for Multiple Group sites
For O365 group sites (including Microsoft Teams), the sites created do not have sharing with anonymous users turned on by default. Instead of turning it on manually for each site, the powershell script allows setting all the modern groups or Team sites sharing capability to ExternalUserAndGuestSharing in an SPO tenant. This enables the creation of anonymous or guest links, allowing users to view the content without logging in. Complete this step for Class Notebook parent and guardian links to work.
Enable for a single team
To enable Class Notebooks Parent/Guardian access, navigate to the desired team in Microsoft Teams.
Get a link to the Files repository by selecting Files> Get link> SharePoint.
Then Copy the URL listed.
Extract the site URL from the link copied in step 3 (include everything until, but excluding, “Shared Documents”).
Run the following PowerShell cmdlet:
Set-SPOSite -Identity <SiteURL> -SharingCapability ExternalUserAndGuestSharing