Hi @Rob,
Thank you for posting your question in the Microsoft Q&A forum.
Regarding your description, in order to override the tenant-level external user expiry, I would recommend trying the PowerShell approach. Below is the PowerShell script that shows how to overcome the organization expiry policy.
Set-SPOSite -Identity "https://yourtenant.sharepoint.com/sites/yourteamsite" `
-OverrideTenantExternalUserExpirationPolicy $true `
-ExternalUserExpirationInDays 0
Explanation of parameter in the script:
- OverrideTenantExternalUserExpirationPolicy $true: This tells SharePoint to ignore the external user expiration policy on this specific site.
- ExternalUserExpirationInDays 0: This disables guest expiration entirely for the site.
For more information, please refer to this article: Set-SPOSite (Microsoft.Online.SharePoint.PowerShell) | Microsoft Learn
Please note:
- In order to perform this, you must be a Global Admin in your organization. If you are an end-user, please contact your IT admin to help you with this.
- To run the script above, you must install the Microsoft SharePoint PowerShell module.
I hope this helps you successfully exclude the guest expiration policy from your SharePoint site using PowerShell. I'm happy to assist and truly hope the information provided has been clear and useful. If you need further help with the PowerShell command or verifying the site settings, feel free to reach out anytime.
If you find this post helpful, please consider marking it as the accepted answer. Doing so can help others in the community with similar questions find solutions more quickly.
Thank you for your engagement and contributions to the forum.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.