The following script will return a list of the distribution groups a Office 365 / Exchange on-line user is a member of.

Connecting to Office 365

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

Getting a users distribution group membership

Change user@domain.com to the correct email address for the user.

$Mailbox=get-Mailbox user@domain.com
$DN=$mailbox.DistinguishedName
$Filter = "Members -like ""$DN"""
Get-DistributionGroup -ResultSize Unlimited -Filter $Filter