Technical Corner – setting calendar permissions in Office365
The goal of this blog is to provide technical notes where we have solved various issues migrating other clients to the cloud, which others may also encounter. We hope the technical tips for cloud migration we write here are helpful.
Problem: An service job scheduler wants to have read/write access to the calendars of all the service technicians but not access to the emails, contacts. The “share my calendar” function in Office365 provides read-only permission to the person with whom the calendar is being shared.
Solution: Using powershell you can direct Exchange Online to make the permission changes. The process is described below:
If you have never used powershell to manage Exchange online then start at step 1 otherwise skip to step 2.
1) Go to http://technet.microsoft.com/library/jj151815.aspx and click on the link install Microsoft Online Services Sign-In Assistant for IT Professionals RTW, then on the same webpage click on the link to install the Windows Azure Active Directory Module (select 32-bit or 64-bit depending on your O/S)
2) On your PC launch Windows Azure Active Directory Module for Windows Powershell – ensure you select “run as Administrator”. When the powershell command window opens enter the following commands:
Do this command the very first time you use powershell:
Set-ExecutionPolicy RemoteSigned
This set of commands connects you to the correct Exchange Online server:
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
import-module MSOnline
Connect-MsolService -Credential $LiveCred
The command to give read/write access is:
add-MailboxFolderPermission -Identity username1:\Calendar -User username2 -AccessRights PublishingEditor
username1 is the owner of the calendar and username2 is the person to be granted access
Note that username is the part in the front of your Office365 user id e.g. if your Office 365 user id is john.doe@mycompany.com then username is john.doe
If the username2 already has some calendar permissions (which is likely since you probably tried the “Share my calendar” option and discovered it gave read only access) then the above command will fail. You need to remove the existing permissions first. The command to do that is:
Remove-MailboxFolderPermission -Identity username1:\calendar -user username2