User AD attributes & Tokens
CodeTwo Email Signatures for Office 365 allows you to add Active Directory attributes of your users to their email signatures.
The program supports all the single-value attributes available in Office 365 (Azure AD) and Azure AD Graph API. Multivalue attributes are not supported (learn more). By default, the most common attributes related to message sender and message properties are available in the signature template editor. Custom attributes may require additional configuration to be accessible, as described later in this article.
You can manage how attributes are synchronized with the program on the User AD attributes & Tokens page of your tenant (Fig. 1.). This page is divided into several sections - use the links below to learn more about each section.
The application stores required user attributes in an internal cache and automatically synchronizes them with your tenant's Azure Active Directory every 60 minutes. This is necessary both to quickly add signatures with placeholders to emails sent by specific users based on current rules, and to keep Azure AD load at a minimum. If necessary, you can manually update the Azure AD cache via the Update cache manually now button (Fig. 2.). Learn more about the Azure AD cache
To read users' Active Directory attributes, the program accesses them via OAuth 2.0 access tokens. These tokens are generated by Microsoft’s trusted OAuth servers. By default, these tokens are generated for the global admin account used to register your Office 365 tenant in the CodeTwo Admin Panel (but you can use other global admin accounts within the same tenant to refresh them, if necessary).
Your credentials are completely safe as they are passed directly and only to Microsoft servers, which is ensured by the Azure's OAuth 2.0 authorization. CodeTwo does not store, copy or have access to your global admin credentials.
Access tokens do not usually expire, but there are some exceptions. Tokens can expire if you change:
- the password of the global admin account that was used to generate (or previously refresh) these tokens (this is usually the admin account that manages your tenant in the CodeTwo Admin Panel);
- the authentication method of that admin account, e.g. enable/disable multi-factor authentication (MFA);
- the security settings in your organization;
- the MFA service settings for trusted devices (learn more).
If the tokens expired, you need to refresh them or the application won't be able to read the values of user AD attributes. This may lead to outdated user information appearing in your signatures.
You will receive an email notification after your tokens expire. This message will contain a link to a website that allows you to refresh your tokens.
You can also refresh the tokens directly on the Manage Tenant page, under User AD attributes & Tokens (Fig. 3.). To access that page, you can either:
- log in to the CodeTwo Admin Panel, go to the Dashboard or the Tenants tab, and click the Manage tenant () button next to the name of your tenant;
- or launch the Manage Signatures App, click the More () button in the upper-right corner and select Settings (Admin Panel).
When refreshing tokens, the Microsoft sign-in screen appears, and you need to log in. Be sure to select the work account that belongs to a global admin of this tenant.
CodeTwo Email Signatures for Office 365 lets you use your own Active Directory attributes when composing signatures. These custom attributes (also known as Directory extension attributes) include, for example: CustomAttribute1-15, Initials, HomePhone, Notes, Pager, WebPage, etc. (Fig. 4.).
If you want to use custom AD attributes in email signatures, you have to make sure they are in sync with the program. Otherwise, they will not be displayed in the signature template editor. Correct synchronization depends on your environment.
Custom attributes can only be used in email signatures. These attributes are not available when defining conditions (such as an Azure AD filter for message senders) of an email signature rule.
In hybrid environments (which synchronize from on-premises to the cloud) it is essential to correctly configure Microsoft Azure Active Directory Connect. By default, custom attributes defined in your on-premises Active Directory are not synced to your Azure Active Directory. Therefore, they are not available to CodeTwo Email Signatures for Office 365 and you are not able to add custom placeholders in the signature template editor.
Our program lets you verify if custom attributes are synchronized. To do that, open CodeTwo Admin Panel, enter the management pages of a chosen tenant by clicking the Manage tenant () button next to the tenant's name, then select User AD attributes & Tokens from the left menu. If your custom attributes are not synced, the section looks as shown below (Fig. 5.).
If you do not see the Custom attributes subsection in User AD attributes & Tokens (Fig. 5.), contact CodeTwo Support.
Second, navigate to the Directory Extensions section (Fig. 7.) by clicking Next. Select your custom attributes from the list on the left (you can choose any attributes from the list but they need to be single-valued to work) and move them to the list on the right. Complete the wizard by clicking Next.
When you finish the configuration, your custom attributes will be synchronized with Azure AD, and the Custom attributes section in the Admin Panel will confirm their availability (Fig. 8.). The corresponding custom placeholders will be available in the signature template editor. See this article to learn how to add them to your signatures.
By default, in environments that do not use MS Azure AD Connect (non-hybrid/cloud-based environments) custom attributes are not synced to CodeTwo Email Signatures for Office 365. PowerShell commands have to be used to access these attributes. That is why our program features a ClickOnce application called CodeTwo Email Signatures for Office 365 - Custom Attributes Sync App. The app is installed locally and lets you quickly synchronize an additional set of custom attributes (Initials, Notes, P.O. Box, Pager, Web page, Web page as link, Home phone, Home phone as link, and CustomAttribute1-15) so that you can use them in your Manage Signatures App.
To install the application, open CodeTwo Admin Panel, go to the Tenants tab, and enter the management pages of your tenant by clicking the Manage tenant () button next to the tenant name. Select User AD attributes & Tokens from the left menu and click the Synchronize attributes button located at the bottom (Fig. 9.). This will allow you to download and run the installer.
If you work in a non-hybrid/cloud environment but the Synchronize attributes button is not displayed in the Custom attributes section, contact CodeTwo Support.
After the Custom Attributes Sync App is installed, it starts automatically (you can also launch it directly from the Windows Start menu at any time). A simple wizard guides you through the configuration process (Fig. 10.).
In the Azure AD login step, provide your Office 365 admin credentials (Fig. 11.). The application will use these credentials to access the Azure AD attributes you want to synchronize. Make sure the admin account has appropriate roles assigned in order to access your Office 365 users and mailboxes. If this account has multi-factor authentication (MFA) enabled, you need to use an app password instead of the regular user password. Learn more about using app passwords with CodeTwo software
CodeTwo does not store, copy or have access to your admin credentials. This personal data is used to access your Azure AD via PowerShell, using standard Microsoft procedures. If you select the option to store your credentials in the program, they will be encrypted and kept only locally.
Now, you need to allow the app to connect to CodeTwo Email Signatures for Office 365 in order to synchronize your Azure AD data. To do so, move on to the next step (CodeTwo login) and click Log in with Office 365 account (Fig. 12.). The Office 365 sign-in page opens. Provide the credentials of an Office 365 account that is authorized to access the Manage Signatures App, and sign in. Click Next to proceed to the last step of the wizard.
In the Synchronization step, click Synchronize. Your custom attributes will be synchronized to the Azure AD cache (Fig. 13.). The application tells you when the process is complete and how many users have been synchronized. Click Close to complete the wizard.
You need to run the Custom Attributes Sync App each time you modify your custom attributes and want to make them available to CodeTwo Email Signatures for Office 365. Such a solution protects your data - you enter your admin credentials only when they are required for the synchronization.
Shared mailboxes are currently not supported by the Custom Attributes Sync App.