Hi @pnts-se,
As far as I know, the behavior you're seeing is by design. If the account used to generate your API token doesn't have access to a certain course (wither through being enrolled directly in the course, or being an admin or the account/subaccount the course belongs to), you should receive an access denied message. I don't think there is a way around this, as it would really be a security/permissions flaw if there was. If you want to be able to modify anything in an instance, you'd been to have a token from an admin role user in the root account.
I'd also like to point out for you or others who might happen upon this thread later that the above applies for course contexts. If you're trying to modify other calendar contexts like user or groups, you'd need other admin permissions set too.
Could you perhaps explain what you're trying to do with a bit more detail so someone might be able to offer some additional advice around this for you? I know you're trying to modify calendars, but what is the end goal/purpose for doing this? Are you developing an external app, or are you an admin trying to clean things up in your Canvas instance or something? Modifying calendars in bulk seems a but unusual to me as an admin, that's why I'm asking just to provide some context for myself and others here.
-Chris