The Azure Maps sample app is a ready-to-import example of Address Validation for Dataverse configured with Azure Maps. It shows the Azure Maps autocomplete control on Account and Contact forms, and two Power Automate flows that check each address with Azure Maps address search. Use it to try Azure Maps in a few minutes, and as a reference when you configure your own forms.
The sample contains no API keys: you bring your own key, and the sample's Setup page stores it in your environment. Download it from the SharpXRM sample apps repository on GitHub.
What the sample contains
| Component | Details |
|---|---|
| Solution | SharpXrmSampleAzureMaps, publisher SharpXRM Samples (prefix sxs) |
| App | Azure Maps Address Sample: a model-driven app with a Setup page, Accounts and Contacts |
| Forms | Account and Contact main forms and quick create forms with the Sharp XRM - Azure Maps Autocomplete control on the address search box, the standard address columns it fills, and a column for every extra output of the control |
| Columns | Sample columns named sxs_az_* on Account and Contact, so samples never collide with each other or with your own columns |
| Setup page | Saves your key in the API Configuration SharpXrmSample_AzureMaps, validates it and shows your license status |
| Power Automate flows | Verify account address with Azure Maps (sample) and Verify contact address with Azure Maps (sample), which verify each new or changed address with Azure Maps address search, write the verified address back and add a note |
| Connection reference | Azure Maps sample - Dataverse (Microsoft Dataverse), used by the flows |
Before you start
- Address Validation for Dataverse installed and licensed in the environment. A trial license works, but it must cover Azure Maps. See Download and Install Address Validation for Dataverse.
- A System Administrator or System Customizer to import the solution, and a System Administrator or SharpXRM - Address Validation Administrator to run the Setup page.
- A Azure Maps subscription key (see step 1).
Step 1: Get your Azure Maps key
- In the Azure portal, open (or create) your Azure Maps account.
- Go to Settings > Authentication and copy the Primary Key (the Secondary Key works too).
For more details, see Set up your Azure Maps API Credentials.
Step 2: Install the sample
- Download the managed solution: SharpXrmSampleAzureMaps_1_0_0_0_managed.zip. To change the sample (for example the forms or the control settings), use the unmanaged solution instead: SharpXrmSampleAzureMaps_1_0_0_0.zip.
- In the Power Apps Maker Portal, select your environment, then go to Solutions > Import solution and import the zip file.
- When asked for the connection reference Azure Maps sample - Dataverse, select or create a Microsoft Dataverse connection. The flows are turned on when the import completes.
Step 3: Configure the sample
- Open the Azure Maps Address Sample app. It opens on the Setup page, which shows the status of Address Validation, your license, the API configuration and the verification flows.
- In 1. Enter your API key, enter your Azure Maps subscription key and select Save and validate. The page creates or updates the API Configuration SharpXrmSample_AzureMaps and checks the key with Azure Maps.
- Check that the status lines are green. If a form was already open, refresh the browser tab (F5): the controls keep their configuration in the browser.
Step 4: Test address autocomplete
- On the Setup page, select New sample account or New sample contact. Quick create account and Quick create contact open the same control on the quick create forms, which + New also uses in the app.
- Start typing a street address in Address search and pick a suggestion. Try: 500 Pine St, Seattle
- The standard address columns and the provider's extra outputs fill in. Save the record to keep them.
The control on the sample forms opens with United States selected (Default Country = US) and lists the United States, Canada and the United Kingdom first (Top Countries = US,CA,GB). Users can still pick any other country.
Step 5: Test background verification
A few seconds after you save a record, the sample flow for that table:
- verifies the address with Azure Maps address search (action
sharpxrm_VerifyWithAzureMaps) through the Microsoft Dataverse connector, - writes the verified address back to the standard address columns (street, unit, city, county, state, ZIP or postal code, country, latitude and longitude),
- adds a note with every value returned, the address that was sent, what was written back and the full response.
Refresh the form to see the note in the Notes section. While a check is running, the Last Verified Address sample column reads PENDING.
The flows use the same key as the control. Each address change uses one Azure Maps search request.
The flows only act on records whose address was picked with this sample's control (the sample Full Address column is filled), so they never change your other Accounts and Contacts. They also skip their own updates. Use them as a starting point for your own flows; see the related articles below.
What the forms show
| Control output | Column on Account and Contact | Type |
|---|---|---|
street | Street 1 (address1_line1) | Standard column |
unitNumber | Street 2 (address1_line2) | Standard column |
city | City (address1_city) | Standard column |
county | County (address1_county) | Standard column |
state | State/Province (address1_stateorprovince) | Standard column |
zip | ZIP/Postal Code (address1_postalcode) | Standard column |
country | Country/Region (address1_country) | Standard column |
latitude | Latitude (address1_latitude) | Standard column |
longitude | Longitude (address1_longitude) | Standard column |
fullAddress | Full Address (sxs_az_fulladdress) | Sample column |
municipality | Municipality (sxs_az_municipality) | Sample column |
(verification flows) | Last Verified Address (sxs_az_verifiedaddress) | Sample column |
Use the sample with other users
- Share the Azure Maps Address Sample app with their security role (Power Apps > Apps > ... > Share).
- Make sure their roles can read Accounts and Contacts, and give them the SharpXRM - Address Validation User role so the control can read its configuration. See Assign privileges for users.
Remove the sample
Delete the SharpXrmSampleAzureMaps solution from Solutions. This removes the app, forms, Setup page, columns and flows. The API Configuration records the Setup page created are kept; delete them from the Address Validation for Power Apps app if you no longer need them. Several samples can be installed side by side.
Troubleshooting
| What you see | What to do |
|---|---|
| Setup page: Address Validation for D365 is not installed | Install Address Validation for Dataverse first, then reopen the app. |
| Setup page: license message | Open the Address Validation for Power Apps app to start a trial or activate your license. The license must cover Azure Maps. |
| Setup page: saved, but it could not be validated | Check the key and the notes shown on the page. |
| The form shows the address box but no suggestions | Refresh the browser tab (F5) so the control reloads its configuration. |
| The control shows a license message instead of the address box | The license is missing, expired, or does not include Azure Maps. |
| No note appears after saving | Check the Verification flows line on the Setup page: the flows must be on and their connection set. The flows only act when the address was picked with the sample's control. Open the flow in Power Automate to see its run history. |
| A note says Address verification failed | The note includes the details. Usually the verification key is missing or invalid (run the Setup page again), or the license does not cover the provider. |