Connection powershell
1-) $LiveCred = Get-Credential
2-) $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
3-) Import-PSSession $Session
4-) Connect-MsolService
Get-Mailbox | Set-MailboxJunkEmailConfiguration -TrustedSendersAndDomains contoso.com, xpto.com