KevinTheJedi
Thank you for your reply.
I've now done the upgrade to v1.18 and also reinstalled the OAuth2 plugin.
The scheduled task was already set up before, but I've now changed the path to php.exe, since I also had to update PHP to 8.2.9.
I still get the same error in the PHP log as before, the system logs of osTicket don't contain anything. I also found that the task returns 2147942655 as a run result, which converts to 0x80070001 and seems to reference an "Illegal Function". However it still says that it completed successfully:

This is what I have as task action:

On my test system the task always returns 0x0 and fetching works, so I assume this might be the cause. I wasn't able to fix this though, any ideas? Thank you