The is_primary is an optional field for many providers, an account may not have a calendar with this attribute as True
This has mostly been noticed for O365 accounts
We suggest having some logic that:
- if no is_primary
- then selects the calendar_name
- or calendar_name
Or simply present user with all the calendars and ask them to select the correct one.