TYPO3 does not use the symfony factory on that directly and have a own transport/mailer around that. Please see corresponding TYPO3 Documentation for that.
Not used myself, but there is also a extension published to use the Migrosoft Graph API
with TYPO3 mailing and you may want to use either that extension or at least look into
the code how it has been implemented within the extension:
The extension integrates the API directly and not using the symfony transport for it. But it should be possible to use that implementation and re-use the symfony transport instead of the api directly.