A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
SharePoint might restrict access following a lengthy period of inactivity, depending on the type of inactivity involved, such as user session inactivity or site-level inactivity, and how the organization's IT administrators have configured the relevant policies.
User session inactivity (idle session timeout) applies if a user leaves a browser or session open and inactive for a specified period. In such case, SharePoint can display a warning and automatically sign the user out to prevent unauthorized access on shared or public devices. By default, SharePoint maintains a user session for up to 5 days of inactivity if the user selects "Keep me signed in," assuming the relevant tokens remain valid. Administrators can also configure custom idle session timeout policies across Microsoft 365.
Inactive site policies (Site Lifecycle Management) applies if an entire SharePoint site remains unused for an extended period. In this case, organizations using SharePoint Advanced Management can apply an Inactive Site Policy. The inactivity threshold might be set to three months, six months, or another duration, depending on the organization's configuration. If site owners are notified but do not certify that the site is still required, automated actions can restrict access. A site can be made read-only, allowing users to view existing content but preventing them from editing or uploading files. Alternatively, the site can be moved to Microsoft 365 Archive, removing it from active storage until it is restored.
Guest access expiration applies if a SharePoint site or its files are shared with external guest users. administrators can configure an external sharing expiration limit ranging from 30 to 700 days. When the configured period expires, guest access is revoked unless a site owner manually extends it.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin