The is_primary is an optional field for many providers, an account may not have a calendar with this attribute as True.
If a customers calendar scope is connected via Microsoft EAS (Active Sync) Null is an valid value.
We suggest having some logic that:
- if is_primary == Null
- then selects the calendar_name
- or calendar_name
Or simply present user with all the calendars and ask them to select the correct one.