Configure EWS with OAuth as input source
- Open ReadSoft Collector General settings dialog box.
- Select the Input tab.
-
Click
.
- In the dialog that is displayed, select OAuth in the Type list.
- Select EWS with OAuth in the Mail server box.
- In the Display name box, type a name that helps you remember what the input source configuration is used for. When the input source configuration is complete, what you enter here is displayed in the Display name column of the Input dialog.
- Add any additional relevant information in the Description box.
-
Click
Next.
The 2:EWS Configuration page is displayed.
- In the EWS URL box, specify the EWS address.
- In the AAD Instance box (that is Azure Active Directory instance), specify the address for the Azure installation that will be used to login with (such as https://login.microsoftonline.com).
-
In the
Tenant Id box, specify the domain of your Azure AD tenant. This is your
domain tenant name or endpoint GUID.
The endpoint GUID is available on the Azure portal > App registration page. Multiple endpoints are visible there, but they all have the same GUID which is what needs to be specified here.
- In the Client Id box, type the application ID that was generated when the application was registered in the Azure portal (for example, f7ce6223-8fe1-4199-b229-bfbe2b5209a0).
- In the Redirect URI box, type the redirect URI that was created when the application was registered in the Azure portal (for example, http://mytestapp, https://mytestapp1).
- In the Resource Server box, specify the API server used to access the user's information. It can accept and respond to protected resource requests with the help of access tokens. If the box is left empty, the resource server for Office 365, https://outlook.office365.com, is used.
-
Click the
Find URL button to obtain the
URL address for the Exchange web
server based on the information provided above. The Exchange Autodiscover service is used to find the correct URL.
Alternatively, you can enter the URL manually.
-
(Optional) Configure impersonation if you want to access a different mailbox using the credentials of the input source
email account:
- Select Use Impersonation.
-
Select Id Type, such as PrincipalName and SmtpAddress.
-
Specify the corresponding Id.
- Click Connect to check the connection.
-
You can use the
Start folder box to filter which folders are displayed in the dialog box.
(while configuring input source). For example, if a lot of folders are accessible from your email account and you use * only, it
may take a considerable amount of time to display the next configuration dialog box since the program looks for all folders that
are accessible from the account specified (including all public/global folders that may be available). It goes much faster if you
use a filter to limit the number of folders that need to be displayed. Consider the following suggestions:
-
In connection with specific paths, forward slashes (/) should be used (Inbox/Collector, for example).
Some mail servers use a different delimiter (backward slash(\), for example). You will need to test this to find out which delimiter applies. -
Using an asterisk (*) is recommended in connection with folder names:
-
Specifying Inbox/* would only display all sub-folders to the Inbox root folder for the specified account (eliminating the need to browse through all public/global folders that may be accessible from this account).
-
Specifying Inbox/Collector/* would narrow the search even more to only those folders (and their sub-folders) under the Collector folder that is under Inbox.
-
Using the /* characters at the end ensures that any additional sub-folders to sub-folders are also displayed. -
-
Click
Next after specifying the filters.
The folders that already exist for the user account specified are displayed. Select the folder where you want ReadSoft Collector to get the source files.
-
Click
Next.
-
Click an item in the folder list to access any potential sub-folders (a + sign is added to the list entry if sub-folders are present).
-
Click the plus sign (+) next to a folder in the list to display sub-folders.
-
To create new folder, right-click a folder in the list and select Create folder.
-
- Specify the folder where files are worked on internally for safer processing. Click Next.
- Specify the destination folder where you want to put processed emails. See tips above. Click Next.
- Specify the folder where you want to put emails that contain errors after processing. Click Next.
-
Click
Finish.
A ReadSoft Invoices Interpret job that is configured to process email using ReadSoft Collector can handle both image and XML-based invoices that are included as attachments but not in the same email. That is, you can have emails with XML attachments, or you can have emails with image file attachments, but you cannot have both XML and image files in the same email.
Authentication flow
In a single-tenant application, sign-in requests are sent to the tenant's sign-in endpoint. Requests sent to a tenant's endpoint can sign in users (or guests) to applications in that tenant.
Native client registrations and v2 applications are multi-tenant by default so no additional actions need to be taken.
For more information about registering an application in Azure, refer Authenticate an EWS application by using OAuth.
Related topic