Do you have any Firewalls or Proxy servers between your Splunk instance and the Microsoft APIs?
Ultimately it looks like the script failed unexpectedly. Can you also check if there are any other logs produced which might have more information (e.g. index=_internal source=*o365*)
🌟 Did this answer help you? If so, please consider:
Your feedback encourages the volunteers in this community to continue contributing