Office 365 Exchange 邮箱属性
Office 365 Exchange Mailbox Properties
我想知道如何访问一组给定的邮箱并获取这些邮箱的各种属性。具体来说,我想遍历一个电子邮件地址列表,并吐出邮箱的类型(即:房间邮箱、用户邮箱等)以及用户拥有谁和什么类型的访问权限。我一直在查看下面的 url,但找不到太多关于此类内容的信息。
https://code.msdn.microsoft.com/Office365/
代码示例将不胜感激。
伪代码:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
var MyMailboxes = service.getMailboxes(MyListofMailboxes);
foreach(var mailbox in MyMailboxes)
{
Console.WriteLine("MailboxType: {0}" + mailbox.MailboxType);
foreach(var userAccess in mailbox.UserAccess)
{
Console.Writeline("User: {0}, Access Level: {1}", userAccess.user, userAccess.AccessLevel);
}
}
您需要使用 Remote Powershell 来执行此操作,请参阅 https://msdn.microsoft.com/en-us/library/office/ff326159(v=exchg.150).aspx。您可以使用 Get-Mailbox、Get-MailboxPermission 和 Get-MailboxFolderPermissions。 EWS 仅在您想要访问邮箱内容以执行管理任务时才有用,您应该使用 Remote Powershell。
干杯
格伦
我想知道如何访问一组给定的邮箱并获取这些邮箱的各种属性。具体来说,我想遍历一个电子邮件地址列表,并吐出邮箱的类型(即:房间邮箱、用户邮箱等)以及用户拥有谁和什么类型的访问权限。我一直在查看下面的 url,但找不到太多关于此类内容的信息。
https://code.msdn.microsoft.com/Office365/
代码示例将不胜感激。
伪代码:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
var MyMailboxes = service.getMailboxes(MyListofMailboxes);
foreach(var mailbox in MyMailboxes)
{
Console.WriteLine("MailboxType: {0}" + mailbox.MailboxType);
foreach(var userAccess in mailbox.UserAccess)
{
Console.Writeline("User: {0}, Access Level: {1}", userAccess.user, userAccess.AccessLevel);
}
}
您需要使用 Remote Powershell 来执行此操作,请参阅 https://msdn.microsoft.com/en-us/library/office/ff326159(v=exchg.150).aspx。您可以使用 Get-Mailbox、Get-MailboxPermission 和 Get-MailboxFolderPermissions。 EWS 仅在您想要访问邮箱内容以执行管理任务时才有用,您应该使用 Remote Powershell。
干杯 格伦