Microsoft Dynamics 365 F&O
Setup and reference guide for the graphiteConnect vendor-master integration with Microsoft Dynamics 365 Finance & Operations.
The Graphite adapter for Microsoft Dynamics 365 Finance & Operations (D365 F&O) synchronizes supplier vendor-master data from graphiteConnect into your D365 environment. The integration is fully cloud-to-cloud: it runs within the Graphite platform and communicates with D365 through Microsoft's standard OData APIs. There is no software to install, host, or maintain on your side.
The adapter creates or updates vendor records across one or more legal entities, including mapped addresses, contacts, bank accounts, document attachments, and registration IDs. Which suppliers, fields, and optional behaviors participate in synchronization is controlled by your integration configuration.
How the Adapter Works
The adapter authenticates through Microsoft Entra ID and reads or writes D365's standard data entities. It does not access the D365 database directly. API permissions, data-entity validation, and applicable D365 business rules govern each operation.
Bank-account approval behavior depends on your D365 workflow and data-entity settings. A successful API operation does not necessarily mean a bank account or proposed change is approved for payment use. See Bank-account approval settings.
Architecture at a Glance
- Nothing to install: Graphite hosts and operates the adapter. Your setup includes an app registration in Microsoft Entra ID and a service account in D365.
- OAuth 2.0 client credentials: The adapter authenticates using your tenant authority, client ID, client secret, and environment scope.
- Standard OData data entities: Reads and writes use published entities such as
VendorsV2,VendVendorPostalAddresses, andVendorBankAccounts. - Encrypted in transit: Communication uses HTTPS.
- Multi-legal-entity support: A supplier can have a separate vendor record in each configured legal entity. Optional party reuse allows these vendor records to share a Global Address Book party.
flowchart LR
subgraph GC["Graphite Cloud"]
DATA["Supplier data and mappings"]
ADP["D365 Adapter"]
DATA --- ADP
end
subgraph MS["Microsoft Cloud"]
ENTRA["Microsoft Entra ID"]
D365["D365 F&O OData API"]
end
ADP -- "Acquire OAuth token" --> ENTRA
ADP -- "HTTPS + Bearer token" --> D365
Data Flow
The integration selects suppliers according to its configured eligibility rules and polling schedule. For each eligible supplier, the mapping produces the ERP records to synchronize.
flowchart TD
A["Eligible supplier change in Graphite"] --> B["Build mapped ERP records"]
B --> C{"Vendor Account Number<br>available for this legal entity?"}
C -- No --> D["Create vendor and capture<br>D365-assigned account number"]
C -- Yes --> E["Update existing vendor"]
D --> F["Synchronize mapped supporting data"]
E --> F
F --> G["Addresses, contacts, registrations,<br>bank accounts, and attachments"]
G --> H["Acknowledge resolved IDs<br>and record synchronization results"]
Key behaviors:
- Create vs. update: A supplied
VendorAccountNumberselects the update path. When no account number is supplied, the adapter creates a vendor and captures the number D365 assigns. Supplying an account number that does not exist does not cause the adapter to create a vendor with that number. - Record resolution: Stored identifiers and resource-specific lookups are used to target existing records. Some operations update directly by a known key; others perform lookups before deciding whether to create or update.
- Acknowledgements: Resolved identifiers are written back to Graphite, including vendor account numbers in the configured ERP-record group, address location IDs, and, when party reuse is enabled,
D365_Party_ID. - Multiple operations: Synchronization uses separate API calls. An error in a later operation does not roll back earlier successful changes.
See ERP Record for acknowledgement fields.
Setup
Setup has four main steps. The Graphite team then configures the mapping and validates the integration with you.
Prerequisites
- Administrative access to your Microsoft Entra ID tenant to create an app registration.
- Administrative access to D365 F&O to create a service account and register the application.
- Your D365 environment URL, for example
https://yourcompany.operations.dynamics.com. - Service-account access to the legal entities included in the integration.
- If API access is restricted by source IP, Graphite's current egress IP addresses, available from your integration contact.
Step 1 — Register an application in Microsoft Entra ID
- In the Azure portal, open Microsoft Entra ID → App registrations → New registration.
- Give the application a recognizable name, such as
Graphite Connect Integration. The client-credentials flow does not require a redirect URI. - Record the Application (client) ID and Directory (tenant) ID.
- Open Certificates & secrets → New client secret.
- Create the secret according to your organization's expiration policy and copy its value when it is displayed.
Track the secret's expiration date and coordinate replacement with Graphite before it expires.
Step 2 — Create a service account user in D365
- Open System administration → Users → Users and create a dedicated integration user, such as
svc-graphite. - Assign security roles that permit the operations required by your mapping.
Depending on the enabled capabilities, access may be required for:
- Vendors and vendor postal addresses
- Party contact information
- Vendor bank accounts and bank groups
- Vendor document attachments
- Tax-exempt numbers
- Registration IDs
- Address master data, including states, cities, and postal codes
Grant access to the relevant legal entities and validate the required operations in a test environment. Cross-company queries do not replace the service account's security permissions.
Step 3 — Register the application in D365
- Open System administration → Setup → Microsoft Entra ID applications. Older versions may label this Azure Active Directory applications.
- Create an entry with:
- Client Id: the Application (client) ID from Step 1
- Name: a recognizable integration name
- User ID: the service account from Step 2
D365 executes requests authenticated with this application under the associated user's permissions.
Step 4 — Provide the connection values to Graphite
Share these values with your Graphite integration contact through an approved secure channel:
| Value | Description | Example |
|---|---|---|
| Environment URL | D365 environment base URL | https://yourcompany.operations.dynamics.com |
| Authority | Microsoft Entra ID tenant authority | https://login.microsoftonline.com/<directory-tenant-id> |
| Client ID | Application (client) ID | 00000000-0000-0000-0000-000000000000 |
| Client secret | Secret value from the app registration | — |
| Scope | Environment URL followed by /.default | https://yourcompany.operations.dynamics.com/.default |
The Graphite team configures the connection, field mapping, synchronization conditions, and optional behaviors, typically validating them first against a D365 sandbox.
Bank-account approval settings
If your environment uses the vendor bank-account workflow, review the settings under Accounts payable → Setup → Accounts payable parameters → General → Vendor bank account approval.
- Bank account approval (create) can require approval for new bank accounts, including accounts created through a data entity.
- Data entity behavior (update) controls updates made through the entity:
- Allow changes without approval: Apply the changes without routing them through the workflow.
- Reject changes: Reject updates to protected fields.
- Create change proposals: Apply unprotected-field changes and store protected-field changes as proposals. The data entity does not automatically submit those proposals to workflow.
The adapter synchronizes through the data entities; it does not submit the D365 vendor bank-account approval workflow. Where approval is required, complete the applicable submission and approval process in D365.
See Microsoft's Vendor bank account workflow documentation.
Data Scope
The adapter maintains D365 vendor master data. Depending on the mapping, it can synchronize:
- General vendor data: Names, vendor group, currency, payment terms, and other supported
VendorsV2fields. - Postal addresses: Vendor addresses and location roles. Creation of supporting states, cities, and postal codes is optional.
- Contact information: Mapped vendor contact fields and Global Address Book email and phone records.
- Bank accounts: Vendor bank accounts, supporting bank groups, and mapped bank documentation.
- Document attachments: Supplier documents attached to the vendor record.
- Tax-exempt numbers:
VATNumTablesentries created before the corresponding number is referenced on a vendor. - Registration IDs: Party/address registrations through the global
Registrationsentity, including location-specific and date-effective records. - Multiple legal entities: Separate vendor records for the legal entities selected in Graphite.
See Transformations for the mapping framework.
Optional Configuration
The following options are configured at the mapping root, alongside d365Records. Each defaults to false and is enabled only by the Boolean value true.
| Option | Behavior when enabled |
|---|---|
addressMasterDataUpsert | Create missing supporting address states, cities, and postal codes. |
useMappedAddressLocationRoles | Use the mapped AddressLocationRoles values instead of the adapter's standard role conversion. Arrays are serialized into D365's semicolon-separated format. |
dynamicPrimaryBank | Select the primary bank using the ERP record's mapped primaryBank reference. |
reusePartyId | Reuse a verified Global Address Book party when extending a supplier to additional legal entities. |
resolveAmbiguousAddressMatch | Enable the adapter's deterministic fallback for supported ambiguous-address cases. Unresolved ambiguity still produces an error. |
expireLegacyBanks | Retire a matching bank account under a different D365 bank-account key while establishing the mapped account. |
expireRemovedBanks | Reconcile active vendor bank accounts against the mapped bank list and expire accounts absent from that list. |
These options are independent. For example, enabling legacy-bank retirement does not automatically enable removed-bank expiry.
When useMappedAddressLocationRoles is disabled, the adapter applies its standard conversion of supported Graphite address roles and adds Head Company to the first mapped address. When it is enabled, the mapping supplies the intended D365 roles.
D365 API Reference
All resources are under your environment's OData root:
https://<environment>/data
Company-scoped records use the relevant legal-entity and record keys. The adapter uses cross-company queries where applicable. Global resources such as Registrations do not use dataAreaId as part of their entity key.
The operations below describe those used by the adapter. Updates and deletes address individual records using their entity keys.
| Data entity | Operations | Purpose |
|---|---|---|
VendorsV2 | GET, POST, PATCH | Look up, create, and update vendors; retrieve party and primary-bank information. |
VendVendorPostalAddresses | GET, POST, PATCH | Resolve, create, and update vendor postal addresses. |
PartyContactsV3 | GET, POST, PATCH | Resolve, create, and update party contact information. |
VendorBankAccounts | GET, POST, PATCH | Resolve, create, update, and expire vendor bank accounts. |
VendorDocumentAttachments | GET, POST, DELETE | Resolve, attach, and replace vendor documents. |
BankGroups | GET, POST | Resolve and create supporting bank groups. |
VATNumTables | GET, POST | Register tax-exempt numbers before they are referenced on a vendor. |
Registrations | GET, POST, PATCH | Resolve, create, and update party/address registration IDs. |
AddressStates | GET, POST | Resolve and optionally create states. |
AddressCities | GET, POST | Resolve and optionally create cities. |
AddressPostalCodesV3 | GET, POST | Resolve and optionally create postal codes. |
AddressCountryRegions | GET | Read country/region settings used for address master data. |
Registration ID Handling
Registration IDs are separate from vendor tax-exempt numbers.
- Vendor tax-exempt-number support uses
VATNumTables. - Mapped
registrationsuse D365's global Registration IDs framework throughRegistrations.
Registration synchronization runs after vendor and address processing because each registration requires a party number and a D365 address location.
A registration can reference a particular Graphite location through locationGraphiteId. When that reference is omitted, the adapter uses the resolved primary address location. If the required party or location cannot be resolved, the registration cannot be synchronized.
Mapped attributes can include:
LegislationTypeTaxRegstrationTypeCountryRegionIdRegistrationNumberValidFromValidTo
TaxRegstrationType follows the spelling used by the D365 entity. Registration types and country settings must correspond to your D365 configuration.
Effective dates participate in registration identity. The adapter resolves the appropriate date-effective record before updating it or creating a new one.
Bank Account Handling
Primary bank selection
By default, the first bank in the mapped bank list is treated as primary.
With dynamicPrimaryBank: true, the adapter instead uses the ERP record's primaryBank reference, matched against the bank's Graphite instance ID. This allows different legal-entity records to select different primary banks.
The reference must identify exactly one mapped bank. A missing or ambiguous selection produces an error and leaves the vendor's existing primary-bank selection unchanged.
The vendor's BankAccountId is updated after the selected bank has synchronized successfully.
Matching existing accounts
The adapter uses the mapped bank-account key and supported account identifiers, such as account number, IBAN, SWIFT/BIC, and routing number, to resolve existing records.
These checks reduce duplicate creation. Their outcome depends on the supplied identifiers, existing D365 records, and the enabled retirement options.
Legacy-bank retirement
With expireLegacyBanks: true, a matching account held under a different VendorBankAccountId can be retired by setting its ExpirationDate, and a record can be established under the mapped key.
D365 bank-account keys cannot be renamed through this update path. Retirement retains the historical record.
Removed-bank expiry
With expireRemovedBanks: true, the mapped bank list represents the intended active bank-account set for the vendor and legal entity.
Any active D365 account absent from that list is a candidate for expiry, including accounts created directly in D365. The behavior is not limited to accounts originally created by Graphite.
- A supplied
banksarray triggers bank processing and, when enabled, reconciliation. banks: []can expire all active accounts for that vendor and legal entity.- Omitting
banksskips bank processing and removed-bank reconciliation.
Removed-bank expiry runs only after successful processing of the current bank payload and the required account lookups. Missing account keys or failed verification prevent reconciliation.
If an expired account remains selected as the vendor's primary bank and no replacement primary has been established, the adapter reports an error requiring a new selection.
Reactivation and expiration dates
When removed-bank expiry is enabled, an expired account that returns in the mapped payload can be reactivated if no expiration is explicitly mapped.
Explicitly mapped expiration dates take precedence, and existing future expiration dates are preserved when no replacement expiration is supplied. Reappearance in the payload does not unconditionally clear every expiration date.
Error Handling
- Targeted request retries: Eligible idempotent requests have retries for supported transient transport and server failures. Generic retries exclude POST requests; specific creation and dependency-recovery paths have their own handling.
- Dependency recovery: Supported address operations can retry when newly created master data is not yet visible to dependent operations.
- Record-level visibility: Results include errors associated with the affected supplier or ERP record, including the D365 response where available.
- Partial completion: A vendor, address, bank, or attachment may have been written successfully before a later operation fails. There is no whole-synchronization rollback.
- Retry after correction: Resolve the reported configuration or data issue, then retry or resynchronize the affected supplier through your integration's configured process.
Results and errors are available in graphiteConnect's Interfaces Administration tool.
Common Technical Questions
Do we need to install or host anything?
No. Graphite hosts the adapter. Your setup consists of the Microsoft Entra ID application, the D365 service account, and the configuration described above.
Do we need a VPN or inbound firewall connection?
The adapter needs HTTPS access to your D365 OData endpoint. If your organization restricts access by source IP, obtain Graphite's current egress IP list from your integration contact.
Does the adapter write directly to D365 tables?
No. It uses standard OData data entities. The entity's permissions, validation, and applicable business rules govern the request.
Which user's permissions apply?
Requests execute as the D365 user associated with the application registration. Access is limited by that user's security configuration.
How are vendor account numbers assigned?
For a new vendor, leave VendorAccountNumber absent so the adapter creates the vendor and captures D365's assigned number. Your D365 number-sequence configuration must support that creation path.
A supplied account number identifies an existing vendor to update. It is not a request to create a new vendor with an externally assigned number.
How are multiple legal entities handled?
The mapping supplies a vendor record for each selected legal entity. When reusePartyId is enabled, the adapter verifies and reuses the supplier's Global Address Book party across those records.
Party identifiers are preserved as strings, including leading zeros. If existing legal-entity vendor records reference different parties, the adapter reports the mismatch for correction in D365. A failed verification can defer creation of additional vendor records.
Does a successful bank sync mean the account is approved for payment?
No. D365 bank-account approval and change-proposal settings can require additional workflow submission or approval. Review the account's status in D365.
How fresh is the data?
Timing depends on the integration's polling schedule, supplier eligibility conditions, Graphite workflow configuration, and any required D365 approvals.
What happens when previously synchronized data changes?
The adapter targets existing records using stored identifiers and resource-specific matching. Unresolved matches and validation failures are reported for correction. Changes are applied through separate API operations.
Related Documentation
- Public API Integrations — Standard ERP integration workflow
- Authentication — Graphite Public API authentication
- Transformations — Field-mapping configuration
- ERP Record — ERP-record acknowledgement fields
- Microsoft: Service endpoints overview
- Microsoft: OData
- Microsoft: Vendor bank account workflow
Updated 15 days ago
