Sign up for Office 365
Learn more about Office 365
Thank you for your post.
Before going further, could you let us know if you want to share folders in users' mailbox, or in document library of Sharepoint Online?
If you want to share folders in user mailbox, you can use cmdlet Add-MailboxFolderPermission to do it. For more information about cmdlet Set-MailboxFolderPermission, please refer to article below.
Meanwhile, if you want to configure share permissions for file/folders in document library in Sharepoint Online, you can refer to article below.
Permission levels and permissions
Manage permissions for a list, library, folder, document, or list item
Any update of your problem? Did the above reply answer your questions? If you need additional assistance on this problem, please let us know. Thank you.