Hi @Ashish Joshi ,
To enable external users sharing, you have to connect your On-Prem SharePoint environment to Azure AD Access Control. And you could configure a federated authentication between Azure Active Directory and SharePoint on-premises. The goal is to allow users to sign in on Azure Active Directory and use their identity to access the SharePoint on-premises sites.
If you have configured Office Online Server with your SharePoint 2019, here is a workaround to enable anonymous share links in SharePoint server 2019. But this workaround is not supported by Microsoft. It requires Office Online Server as the guest sharing links leverage the web-based Office viewer/editor. You could run the following PowerShell:
$farm = Get-SPFarm
$farm.Properties.Add("GuestSharingEnabled",$true)
$farm.Properties.Add("SPO-GuestSharingUIEnabled",$true)
$farm.Update()
For more details:
Is Sharing with external users allowed in SharePoint 2013 On Premises?
Enabling Anonymous Share Links in SharePoint Server 2019
Tutorial: Implement federated authentication between Azure Active Directory and SharePoint on-premises
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
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.