Problem/Motivation

Error after Login via Microsoft in /admin/config/system/mailer/office365

TypeError: Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport::setUsername(): Argument #1 ($username) must be of type string, null given, called in /symfony_mailer_office365/src/Office365EsmtpTransportFactory.php on line 56 in Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport->setUsername() (line 77 of /vendor/symfony/mailer/Transport/Smtp/EsmtpTransport.php)

Steps to reproduce

1. Install module
2. Add required information into fields
3. Click 'Login via Microsoft'
4. Sign in via Microsoft Office 365 interface
5. Automatically redirect back to home
6. Open back /admin/config/system/mailer/office365
7. State is still not functional

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 1.x Comparechanges, plain diff MR !2

Comments

akmalfikri created an issue. See original summary.

joelsteidl’s picture

I'm experiencing the same issue. Any thoughts on troubleshooting?

akmalfikri’s picture

The error now turned into this :

Error: Call to a member function getToken() on null in Drupal\symfony_mailer_office365\Transport\Smtp\Auth\XOAuth2Authenticator->authenticate()

n1k’s picture

Status: Active » Fixed

I've created a new 1.0.0-alpha4 Release.

This includes supporting the "microsoft" schema, which I merged, thanks @joelsteidl

@akmalfikri
I was able to reproduce this error on another site.
This should also be fixed with the new Release.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.