Overview
Phixflow supports OAuth authentication required for accessing email common web email platforms such Office 365 and Google Developer.
In order to operate some initial configuration is required on the email platform and within PhixFlow.
Once the initial configuration is performed, 'Modeller' users can then create their own inbound Email accounts.
System Configuration Setup in PhixFlow
- Check the following
- Ensure that the System Configuration → System URL field is set to the public URL PhixFlow is accessed on by users.
- For example, http://phixflowhost.com/phixflow/
- Ensure the secure flag is set on cookies, see Install Tomcat
- Ensure that the System Configuration → System URL field is set to the public URL PhixFlow is accessed on by users.
Host's Application Configuration
- Configure the application in Azure, Google Developer or similar.https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app
- Configuration parameters
- The application type is Web.
- The redirect URL is yourPhixFlowInstance/receiveTokenAuthentication.htm
O365 Application configuration
In order to allow PhixFlow to trigger OAuth authentication within an O365 environment an 'Application' has to be made within the O365 tenant. These steps must be performed by someone with at least the Cloud Application Administrator role.
- Login to https://entra.microsoft.com/
- Select Identity | Applications | App registrations
- Select New Registration
- Configure
- Give it a name,
- Account type of: Accounts in this organisation directory only
- Redirect URL type Web, url <Base Phixflow Url>/receiveTokenAuthentication.htm (https://example.phixflow.com/phixflow/receiveTokenAuthentication.htm)
- Press register
- Take a note of the “Application (client) ID”, this is the 'Client ID'
- Click “Add a certificate or secret” under Client Credentials and then click “new Client secret”
- Give the certificate a name
- Set the expires time after which the secret has to be refreshed. Either use the default 180 days, or pick an alternative value such as 730 days.
- Ensure you create a new the secret before it expires.
- Press Add
- Take a note of the 'value', this is the 'Client Secret'
Client Token Configuration in PhixFlow
As an Administrator
- In PhixFlow create a Client Token Configuration from the Full Repository.
- To allow a user to authenticate choose the User flow
- Set the Client ID to the value obtained from Azure/Google
- Client Secret to the value obtained from Azure/Google
- Google
- Auth URL https://accounts.google.com/o/oauth2/v2/auth?prompt=&access_type=offline
- For tokens to auto renew set access_type=offline as a parameter in the URL
- Token URL https://oauth2.googleapis.com/token
- Scopes https://mail.google.com/
Google only sends a refresh token on the first authentication so if you don’t get a refresh token you have to delete the connection from Google and authenticate again.
- Auth URL https://accounts.google.com/o/oauth2/v2/auth?prompt=&access_type=offline
- Microsoft
- Base URL https://login.microsoftonline.com/common/ or https://login.microsoftonline.com/{tenantId}
- Scopes, recommended setup:
https://outlook.office.com/SMTP.Send https://outlook.office.com/POP.AccessAsUser.All https://outlook.office.com/IMAP.AccessAsUser.All offline_access openid email
Create an Email Account in PhixFlow
These steps can be performed by a Modeller
- Create an Email Account in the Full Repository.
- Set Enabled
- Set Type to
Inbound
orOutbound
depending on your requirements. - Set Authorisation Type to
OAuth2
- Select your client token configuration.
- Click Authenticate Email Account to perform the authentication process which provides access to your Google/Microsoft account.
- POP, IMAP, and SMTP settings for Outlook.com - Microsoft Support
- For POP Outlook add to the properties mail.pop3s.auth.xoauth2.two.line.authentication.format=true
O365 Email Account configuration
The following settings are recommended for an O365 email account:
- Name: as desired
- Enabled: true
- Type: as desired, only one outbound email account is supported.
- Host: outlook.office365.com
- Protocol: IMAP
- Encryption: SSL/TLS
- Use Default Port: true
- Authorisation Type: OAuth 2
- Login: Email address
- Token Configuration: The appropriate token configuration
Save and click Authenticate Email Account to complete configuration.
Conclusion
Once an initial inbound email account has been created and authenticated, subsequent email accounts can be created without requiring administrator support.