Here are a few threads I found related to this issue in context of Azure data factory.
Have you completed the 'Test Connection' in your O365 Linked Service?
Please provide below values while creating your O365 Linked Service and retry to test your connection and once it is successful, please retry triggering your pipeline. If your issue still persists, please let me know.
Service Principal ID --> Application ID of your App registration
Tenant ID --> Tenant/Directory ID of your App registration
Service Principal Key --> Secret of your App registration.