문제

We are looking for the easiest way to display a Main Calendar of events for our organization in SharePoint Online. The ideal scenario is users in our org will add the Main Calendar as an attendee to events they create in Outlook.

It appears adding an Exchange/Outlook calendar as an overlay in a SharePoint Online calendar does NOT work (I believe it does only in on-prem). The only real way I've found to do this without coding is on a SharePoint calendar choose 'Sync to Outlook', and then in Outlook copy the events over via list view. There are some paid apps in the office store but we are not interested in them.

Thus, we've been looking at the Graph API and possibly a SharePoint Framework web part (it looks you can call the Graph API with ADALjs in a SPFx webpart). Access to the Graph API requires an additional sign in step though so I'm not sure this is ideal if we have to have our users, inside sharepoint, sign in again to view the calendar. I've setup the simple NodeJS Graph API sample from the microsoft github but it required a sign in step. But if we want to display a calendar to users can we do this without requiring an additional sign in? Should we try to use the SharePoint Framework in combo with the ADALJS ? Or just deploy some js code that can connect to the Graph API in a CEWP?

도움이 되었습니까?

해결책

Ended up using Layer 2 Cloud Connector to sync O365 Resource calendar (which can auto accept invites) events to a SharePoint list then in SharePoint used jquery FullCalendar. Layer 2 Exchange data provider is a wrapper on exchange web services (EWS) so it is doable without layer 2 if you can access EWS.

O365 Resource calendars don't have a password by default - and I needed a password in the connection string to connect to the calendar with the Layer 2 Exchange data provider - so I had to run this powershell against exchange online:

Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -
ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential 
$UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

$passwd = ConvertTo-SecureString -String "mypassword" -AsPlainText -Force
Set-Mailbox -Identity “mycalendar@mydomain.com” -EnableRoomMailboxAccount 
$true -RoomMailboxPassword $passwd

I also had to run powershell to show the meeting title (would just show the organizer name by default) and allow conflicts (https://support.microsoft.com/en-us/help/2842288/resource-mailbox-s-calendar-shows-the-organizer-s-name-instead-of-the)

There is some field mapping to do from the outlook calendar to a sharepoint list. I used jquery SPServices to read the data from the sharepoint list into the calendar.

This is a good resource for the fullcalendar: https://joshmccarty.com/sharepoint-jquery-and-fullcalendar-now-with-spservices/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top