Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emailconnector - Re-authenticate option not included #9005

Open
davelina opened this issue Jan 31, 2025 · 1 comment
Open

emailconnector - Re-authenticate option not included #9005

davelina opened this issue Jan 31, 2025 · 1 comment
Assignees

Comments

@davelina
Copy link

Please use the form below, leaving the prefilled data to help us. Thank you.

Page link: email

Document link: email-connector.md

My Issue/Suggestion

My issue is about the 'Adding OAuth 2.0 Configuration to an App with Basic Authentication from step 4 to 5, because this action is non existing.
I don't have a Server Settings tab and I can't re-authenticate.

The flow ACT_EmailAccount_GetOrRenewTokenJavaAction seems like where they are refering to, but this flow is not being used in the module.
We are using the latest version compatible with 9.24.31 (as for now that is version 5.9.3).

Hope you can help us figgering out if this could be a problem, because for now our oauthprovider setup gives us a log message back that says:
"
2025-01-31T12:14:01.008199 [APP/PROC/WEB/0] ERROR - Email_Connector: New access token is empty.
2025-01-31T12:14:01.015172 [APP/PROC/WEB/0] ERROR - Email_Connector: Sending email caused an error: EC0x018: OAuth access token not found, try to re-authorize the account
"

The chapter I'm refering to

Adding OAuth 2.0 Configuration to an App with Basic Authentication
If you already have an email account configured using basic authentication in your app, and you want to use OAuth 2.0 authentication without removing that email account, do the following:

  1. On the overview page, click OAuth Configurations and add a new configuration. For more information, see OAuth Provider Configuration Details.
  2. For the desired email account, set the isOAuthUsed attribute of the EmailAccount entity to True.
  3. Associate the email account with your newly created OAuth provider.
  4. Navigate to the overview page, click Manage Accounts, and select the account.
  5. Go to the Server Settings tab in Account Settings and select Re-authenticate Access.
@quinntracy quinntracy self-assigned this Feb 3, 2025
@mahendra-mahajan-mendix
Copy link
Contributor

Hello Dave @davelina - The section that you are referring is actually a migration scenario. We have put in this section here for the folks who have a Basic email account configured and would like to "migrate" to OAuth for the same email account without deleting the configured (Basic Auth) account. The following activities are a mix of activities that are done from UI and some activities to be done in the backend / or manipulating the object(s) via Microflow.

In this case, you have to create a fresh OAuth configuration from the Email Connector's UI & select the correct flow e.g. OAuth code grant flow or Client Credential flow and provide required details like Client Id, secret, callback URL or Tenant ID. ( UI Activity)

For the already configured Email object, set the isOAuthUsed boolean flag to true by manipulating the EmailAccount Object. Associate this Email Account Object to the newly created OAuth provider record created from the UI. (To be done either by manipulating objects via Database or retrieving them in a Microflow and updating them).

Now, navigate to the Email Account ( UI Activity) and click on the "Gear icon" to see the settings. Go to Server setting tab, you should see a Re-authenticate button which should be clicked to complete the Authentication formalities, possibly including the MFA to get a valid token.

If you want to add/configure an Email Account using OAuth (code grant or client cred flow) - you can simply follow the chapter 3 (Section 3.1) and following the steps to create OAuth configuration (Section 4.7) - https://docs.mendix.com/appstore/modules/email-connector/#create-oauth

CC: @quinntracy - You can close this ticket if the above comment clarifies the doubt of the Maker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants