Because you can't change the protection in a shared workbook, you won't
be able to use the grouping feature on a protected sheet.
In a workbook that isn't shared, you can run a macro as the workbook
opens, to apply protection and allow grouping. Here's some sample code
posted by Dave Peterson:
Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub