简体   繁体   English

Exchange-以编程方式创建的邮箱无法访问用户的日历

[英]Exchange - Programmatically Created Mailbox Can't Access Users' Calendars

I've been using a web application I've written to remotely create users/mailboxes on my Exchange server. 我一直在使用编写的Web应用程序在Exchange服务器上远程创建用户/邮箱。 However, users created using this method have been unable to see other users' calendar information within the same organization. 但是,使用此方法创建的用户无法查看同一组织内其他用户的日历信息。 Did I forget some important parameter? 我忘记了一些重要的参数吗?

I'm almost certainly not following best practices, but I essentially craft a command and send that to the Exchange powershell for my organization, like so: 几乎可以肯定,我没有遵循最佳实践,但是我实际上是在编写命令并将其发送给我的组织的Exchange Powershell,如下所示:

Dim runspace As Runspace
runspace = ConnectToExchange()

Dim command = New Command("New-Mailbox")
command.Parameters.Add("Name", firstName & " " & lastName)
command.Parameters.Add("Alias", userName)
command.Parameters.Add("OrganizationalUnit", ou)
command.Parameters.Add("UserPrincipalName", userName & "@" & domainName)
command.Parameters.Add("SamAccountName", userName)
command.Parameters.Add("FirstName", firstName)
command.Parameters.Add("Initials", "")
command.Parameters.Add("LastName", lastName)
command.Parameters.Add("Password", securePassword)
command.Parameters.Add("ResetPasswordOnNextLogon", True)
command.Parameters.Add("Database", db)
command.Parameters.Add("AddressBookPolicy", abp)

runspace.Open()
Dim pipeline = runspace.CreatePipeline()
pipeline.Commands.Add(command)

' Execute the command
Dim results = pipeline.Invoke()

runspace.Dispose()

I should mention that I've reviewed the docs , but the only thing that stands out to me is the Sharing Policy parameter. 我应该提一下,我已经审查了文档 ,但是对我来说唯一突出的是“共享策略”参数。 Reviewing now.. 正在审核..

EDIT: I have the same Sharing Policy applied as a test user I've just created. 编辑:我具有与刚刚创建的测试用户相同的共享策略。 I can view others calendars, but the test user cannot. 我可以查看其他日历,但测试用户无法查看。

SECOND EDIT: I ran the following cmdlets for both my normal account (which can see calendars) and the test account (which cannot see calendars): 第二次编辑:我为我的普通帐户(可以看到日历)和测试帐户(无法看到日历)运行了以下cmdlet:

Get-Mailbox identity.here | Format-List * | Out-File C:\Users\MyName\Desktop\file.txt

I then ran these through a diff tool and found the differences. 然后,我通过diff工具运行了它们,发现了差异。 There was nothing notable that would cause this issue! 没有什么可引起此问题的! I don't know where to turn to next. 我不知道接下来要去哪里。

please run the following CMDlet on both accounts: 请在两个帐户上运行以下CMDlet:

Get-MailboxFolderPermission -Identity john@contoso.com:\Calendar

Please note that the "Calendar" part seems to depend on your Exchange installation language (in German its "Kalender" for example). 请注意,“日历”部分似乎取决于您的Exchange安装语言(例如,德语为“ Kalender”)。

If i get you right your account probably has AccessRights:{PublishingEditor} set. 如果我正确,那么您的帐户可能设置了AccessRights:{PublishingEditor}。 If so run the following CMDlet on the account that doesnt have access: 如果是这样,请在没有访问权限的帐户上运行以下CMDlet:

Set-MailboxFolderPermission -Identity john@contoso.com:\Calendar -User Default -AccessRights Reviewer

Hope that helps 希望能有所帮助

Paul 保罗

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM