Validate Addresses with Power Automate: Azure Maps (Unbound Action)

Azure Maps - Configuration

Overview

Address Validation for Dataverse exposes Azure Maps address search as a Dataverse unbound action named sharpxrm_VerifyWithAzureMaps (display name Verify With Azure Maps). Power Automate can call it with the standard Microsoft Dataverse connector and its Perform an unbound action step.

The action returns the best matching address, a confidence level and the coordinates. It does not update any record. Your flow decides whether the match is good enough to write back.

Example flow that validates a contact address with Azure Maps

Before you start

  • Address Validation for Dataverse is installed in a version that includes the Power Automate unbound actions (sharpxrm_VerifyWithAzureMaps appears in the Action Name list).
  • A valid Address Validation license.
  • An active API Configuration row with Validation Service Type = Azure Maps API and your Azure Maps key. See Setup you Azure Maps API Credentials.
  • A Microsoft Dataverse connection in Power Automate.

How the example flow works

  1. When a row is selected (Table Name = Contacts): users run the flow from the Flow menu on a contact. With several contacts selected, the flow runs once per contact.
  2. Contact ID (Compose) and Get contact (Get a row by ID): read the current Address 1 columns, including latitude and longitude.
  3. Get AzureMaps configuration (List rows) and Configuration found (Condition with a Terminate in the False branch).
  4. Verify with Azure Maps (Perform an unbound action).
  5. Is address level match (Condition): overwrites Address 1 only for a confident, address-level match.

When a row is selected trigger on the Contacts table

Find the API Configuration

Use List rows on APIs Configuration to get the configuration ID by name instead of hard-coding a GUID:

FieldValue
Table nameAPIs Configuration
Select columnssharpxrm_sharpxrmconfigurationid,sharpxrm_name
Filter rowssharpxrm_name eq 'AzureMapsAPI' and statecode eq 0. Use the API Config Name of your Azure Maps record.
Row count1

List rows action that finds the Azure Maps API Configuration row

Call the unbound action

Add Microsoft Dataverse > Perform an unbound action and choose Action Name = sharpxrm_VerifyWithAzureMaps. Add the inputs from Advanced parameters.

Perform an unbound action configured for sharpxrm_VerifyWithAzureMaps

Why does the designer say "Showing 10 of 55"? The API Configuration input is a reference to a table row, so the designer lists every column of that table. Only the ID field needs a value.

Input fields

Designer fieldRequiredWhat to enterValue used in the example
sharpxrm_sharpxrmconfiguration
item/APIConfiguration/sharpxrm_sharpxrmconfigurationid
YesThe ID (GUID) of the API Configuration row that holds the Azure Maps key.first(outputs('Get_AzureMaps_configuration')?['body/value'])?['sharpxrm_sharpxrmconfigurationid']
item/InputStreetAddressRecommendedHouse number and street name. Without a resolvable street, the action returns ResultFound = Failed.Address 1: Street 1
item/InputUnitNumberOptionalApartment, suite or unit. Azure Maps does not validate unit numbers, so this value is returned unchanged in UnitNumber.Address 1: Street 2
item/InputCityRecommendedCity or locality.Address 1: City
item/InputStateRecommendedState or province.Address 1: State/Province
item/InputZipPostalCodeOptionalZIP or postal code.Address 1: ZIP/Postal Code
item/InputCountyOptionalCounty or region.Address 1: County
item/InputCountryRecommendedCountry name or ISO code.Address 1: Country/Region
item/RecordLogicalNameOptionalLogical name of the row being validated. Used only to stamp the transaction log.contact
item/RecordIdOptionalID of the row being validated, for the transaction log only.Contact ID output

A transaction log is written only when Save Transaction Logs is enabled on the API Configuration row.

Output values

OutputDescription
ResultFoundSuccess or Failed.
VerificationDetailsFor example OK|Validation Status : VERIFIED or OK|Validation Status : POSSIBLE_MATCH. On failure, it contains the reason.
ConfidenceBased on the Azure Maps match score: VERY_HIGH (score of 0.90 or more), HIGH (0.75 or more), MEDIUM (0.50 or more), otherwise LOW.
StreetAddressHouse number and street, for example 1600 Amphitheatre Parkway. If Azure Maps only matched the street, there is no house number.
UnitNumberThe unit you supplied, returned unchanged.
City, State, County, CountryFor example Mountain View, CA, Santa Clara, United States.
ZipPostalCode, ExtendedZipPostalCodePostal code, plus the extended code (ZIP+4 in the US, or the full code such as M5H 1H1 in Canada).
FullAddress, Latitude, LongitudeFormatted address and coordinates.
EntityTypeUsually empty for street addresses.

Decide whether to update the row

Important: Azure Maps has no rooftop indicator, and it can give a street-only match a very high score. For example, Main Street, Toronto returns VERY_HIGH with several postal codes. The example therefore requires all three of these conditions before it overwrites:

  • body/ResultFound is equal to Success.
  • Confidence is VERY_HIGH or HIGH.
  • The validated street starts with a house number: and(greater(length(trim(coalesce(outputs('Verify_with_Azure_Maps')?['body/StreetAddress'], ''))), 0), contains('0123456789', take(trim(coalesce(outputs('Verify_with_Azure_Maps')?['body/StreetAddress'], '')), 1))) is equal to true.

Condition that checks confidence and the presence of a house number

In the True branch, Update a row (Contacts) maps StreetAddress, UnitNumber, City, State, ZipPostalCode, County, Country, Latitude and Longitude to the Address 1 columns. Each column keeps its current value when the output is empty, using an expression such as if(empty(outputs('Verify_with_Azure_Maps')?['body/County']), outputs('Get_contact')?['body/address1_county'], outputs('Verify_with_Azure_Maps')?['body/County']). In the False branch, a Compose records the result, confidence, details and suggested address for the run history.

Expected results

  • 1600 amphitheatre pkwy, mountain view, CA, USA: VERY_HIGH with a house number. Updated to 1600 Amphitheatre Parkway, Mountain View, CA 94043, Santa Clara, United States, with coordinates.
  • 100 king st w / suite 5700, toronto: MEDIUM, so the contact is left unchanged.
  • Main Street, Toronto: VERY_HIGH but no house number, so the contact is left unchanged.

Tips and troubleshooting

  • Adjust the rule to your data: to be stricter, accept only VERY_HIGH. Keep the house-number check either way.
  • ResultFound is Failed: check VerificationDetails for an invalid license, insufficient address data, or an Azure Maps key problem.
  • Unit numbers: Azure Maps does not confirm units. If unit accuracy matters, use Google Address Validation or Melissa.
  • Cost: every run calls Azure Maps and counts towards your Azure usage.

Was this article helpful?