when you, for example, connect to your Office 365 account from Exchange and join a group, you see the groupβs shared mailbox. When you then view your Office 365 inbox online, not in Exchange, you also see this group,
If your Office365 group you are talking about, you can access it through GetUserUnifiedGroups in the latest version of the managed API from git hub https://github.com/OfficeDev/ews-managed-api eg
RequestedUnifiedGroupsSet Group = new RequestedUnifiedGroupsSet(); Group.FilterType = UnifiedGroupsFilterType.All; Group.SortDirection = SortDirection.Ascending; Group.SortType = UnifiedGroupsSortType.DisplayName; List<RequestedUnifiedGroupsSet> reqG = new List<RequestedUnifiedGroupsSet>(); reqG.Add(Group); Collection<UnifiedGroupsSet> ugGroupSet = service.GetUserUnifiedGroups(reqG,"jcool@domain.com"); foreach (UnifiedGroupsSet ugset in ugGroupSet) { foreach (UnifiedGroup ugGroup in ugset.Groups) { Console.WriteLine(ugGroup.SMTPAddress); } }
Mailboxes that allow access to where automatic matching is enabled (these are mailboxes that Outlook automatically displays in profile), for example, Add-MailboxPermission -AutoMapping can be opened using autodiscover, for example
AutodiscoverService adAutoDiscoverService = new AutodiscoverService(ExchangeVersion.Exchange2013_SP1); adAutoDiscoverService.Credentials = new NetworkCredential("user@domain.com", "pass"); adAutoDiscoverService.EnableScpLookup = false; adAutoDiscoverService.RedirectionUrlValidationCallback = adAutoDiscoCallBack; adAutoDiscoverService.PreAuthenticate = true; adAutoDiscoverService.KeepAlive = false; GetUserSettingsResponse gsp = adAutoDiscoverService.GetUserSettings("user@domain.com", UserSettingName.AlternateMailboxes); Object Mailboxes = null; if (gsp.Settings.TryGetValue(UserSettingName.AlternateMailboxes, out Mailboxes)) { foreach (AlternateMailbox Mailbox in ((AlternateMailboxCollection)Mailboxes).Entries) { Console.WriteLine(Mailbox.SmtpAddress); } }
However, the mailboxes in which you just added rights to the Mailbox or Mailbox do not know this, and then list each of the DACL mailboxes and check it.
Glen scales
source share