Azure Maps (Preview)

Azure Maps provides geospatial APIs for mapping, routing, geocoding, and reverse geocoding.

This connector is available in the following products and regions:

Service Class Regions
Copilot Studio Standard All Power Automate regions except the following:
     -   China Cloud operated by 21Vianet
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Apps Standard All Power Apps regions except the following:
     -   China Cloud operated by 21Vianet
Power Automate Standard All Power Automate regions except the following:
     -   China Cloud operated by 21Vianet
Contact
Name Microsoft
URL https://www.microsoft.com/
Connector Metadata
Publisher Microsoft
Website https://azure.microsoft.com/products/azure-maps
Privacy policy https://privacy.microsoft.com/privacystatement
Categories Data;Productivity

Azure Maps Connector

Type: Codeless | Tier: Standard | Status: Preview

Provides mapping, routing, geocoding, and reverse geocoding capabilities via the Azure Maps REST API. Requests are handled entirely by APIM policy — there is no connector webapp.

Authentication

API key authentication. Connections require an Azure Maps subscription key.

Parameter Type Required Description
subscription_key securestring Yes Azure Maps subscription key

The key is extracted from the connection token and passed to Azure Maps as the subscription-key query parameter by the policy (CheckForToken / GetAuthHeaderValue).

Cloud Availability

Cloud Available
Public Yes
Fairfax (GCC) Yes
GCC High Yes
DoD Yes

Actions

Get route — GetRoute

Calculate a driving or walking route between two waypoints. Waypoints must be coordinate pairs (latitude,longitude). Addresses are not supported — geocode them first using Get location by address.

Endpoint (after policy): POST https://atlas.microsoft.com/route/directions?api-version=2025-01-01

The policy converts the GET-style query parameters into a GeoJSON FeatureCollection POST body, flips coordinates to longitude,latitude order, and maps avoid/optimize values to Azure Maps equivalents.

Parameter Required Type Description
Waypoint 1 (wp.0) Yes string Starting point as latitude,longitude (e.g. 47.610,-122.107)
Waypoint 2 (wp.1) Yes string Ending point as latitude,longitude (e.g. 47.612,-122.204)
Travel mode (travelMode) No string driving (default) or walking
Avoid highways No boolean Maps to avoid=limitedAccessHighways
Avoid tolls No boolean Maps to avoid=tollRoads
Avoid ferries No boolean Maps to avoid=ferries
Avoid crossing country borders No boolean Maps to avoid=borderCrossings
Optimize No string fastestWithoutTraffic, fastestWithTraffic, or shortest

Response: Route summary with travel distance (meters), duration (seconds), duration with traffic (seconds), and route leg details.

Note: Transit routing is not supported. Azure Maps Route Directions only supports driving and walking.


Get location by address — GetLocationByAddress

Geocode a structured address to coordinates and location details.

Endpoint: GET https://atlas.microsoft.com/geocode?api-version=2023-06-01

Parameter Required Type Description
Address line (addressLine) No string Street line (e.g. 15595 NE 36th St)
Locality (locality) No string City (e.g. Redmond)
Admin district (adminDistrict) No string State abbreviation (e.g. WA)
Postal code (postalCode) No string ZIP or postal code (e.g. 98052)
Country region (countryRegion) No string ISO 2-letter country code (e.g. US)
Max results (top) No integer 1–20, default 5

Response: GeoJSON FeatureCollection. Each feature has:

  • geometry.coordinates[longitude, latitude]
  • properties.confidenceHigh, Medium, or Low
  • properties.addressaddressLine, locality, adminDistricts, postalCode, countryRegion (object with name and ISO), formattedAddress

Note: Azure Maps geocoding does not support addresses in China.


Get location by point — GetLocationByPoint

Reverse geocode latitude/longitude coordinates to an address.

Endpoint (after policy): GET https://atlas.microsoft.com/reverseGeocode?api-version=2023-06-01&coordinates={longitude},{latitude}

The policy combines the separate latitude and longitude parameters into the coordinates query parameter in longitude,latitude order.

Parameter Required Type Description
Point latitude (latitude) Yes double e.g. 47.64054
Point longitude (longitude) Yes double e.g. -122.12934

Response: Same schema as Get location by address (GetLocationByAddress_Response).


Get static map — GetMap

Get a static map image centered on a point.

Endpoint (after policy): GET https://atlas.microsoft.com/map/static?api-version=2024-04-01

The policy combines latitude/longitude into the center parameter (longitude,latitude), maps imagerySet to the Azure Maps style value, and passes the optional pushpin as a pins parameter.

Parameter Required Type Description
Center latitude (latitude) Yes double e.g. 47.64054
Center longitude (longitude) Yes double e.g. -122.12934
Map style (imagerySet) Yes string See style mapping below
Zoom level (zoomLevel) Yes string 0–20, default 10
Width (pixels) No integer Default 512
Height (pixels) No integer Default 512
Image format No string jpeg or png (default png). GIF is not supported.
Pushpin latitude No double Pushpin location latitude
Pushpin longitude No double Pushpin location longitude
Pushpin label No string Short label text

Imagery set mapping:

imagerySet input Azure Maps style
Road main
Aerial satellite
AerialWithLabels satellite_road_labels
CanvasDark dark
CanvasLight road_shaded_relief
CanvasGray grayscale_light

Response: Binary image (image/jpeg or image/png). In Power Automate flows the response body is base64-encoded. To display or save the image:

  • Use the base64ToBinary() expression to convert before saving to OneDrive/SharePoint.
  • Use an HTML table or Send an email action with an <img src="data:image/png;base64,{body/$content}"> tag to render inline.

Policy Notes

  • subscription-key is injected by policy; it is never passed through from the caller.
  • The x-ms-apim-tokens and origin headers are stripped on inbound.
  • Content-Type: application/json is forced on all non-image requests; image responses restore the correct image/* content type on outbound.
  • GetRoute converts a simple query-parameter request into a POST with a GeoJSON body — callers do not need to construct the body themselves.

Files

File Purpose
apiDefinition.swagger.json OpenAPI definition
Deployment/policies.xml APIM policy
Deployment/PolicySourceCode.cs Policy C# logic
connector-config-internal.json Auth and environment config
connector-config-cli.json Capabilities (actions)
connector-config-certification.json API name (azuremaps) and tier (Standard)
connector-config-metadata.json Ownership metadata

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Shareable

Default

Applicable: All regions

Parameters for creating connection.

This is shareable connection. If the power app is shared with another user, connection is shared as well. For more information, please see the Connectors overview for canvas apps - Power Apps | Microsoft Docs

Name Type Description Required
Subscription Key securestring Azure Maps subscription key True

Actions

Get location by address (Preview)

Geocode an address to get its coordinates and location details.

Get location by point (Preview)

Get the location information associated with latitude and longitude coordinates.

Get route (Preview)

Calculate a driving or walking route using waypoints. Waypoints must be provided as latitude,longitude coordinates.

Get static map (Preview)

Get a static map image centered on a point. GIF is not supported; use JPEG or PNG.

Get location by address (Preview)

Geocode an address to get its coordinates and location details.

Parameters

Name Key Required Type Description
Address line
addressLine string

The street line of an address (not including city, state, etc).

Locality (City)
locality string

The locality, such as a US city.

Admin district (State)
adminDistrict string

A subdivision such as a US state abbreviation (e.g. WA).

Postal code
postalCode string

The postal or ZIP code.

Country region
countryRegion string

The ISO 2-letter country code (e.g. US).

Max results
top integer

Maximum number of results to return (1-20). Default: 5.

Returns

Get location by point (Preview)

Get the location information associated with latitude and longitude coordinates.

Parameters

Name Key Required Type Description
Point latitude
latitude True double

The latitude coordinate to reverse geocode. Example: 47.64054

Point longitude
longitude True double

The longitude coordinate to reverse geocode. Example: -122.12934

Returns

Get route (Preview)

Calculate a driving or walking route using waypoints. Waypoints must be provided as latitude,longitude coordinates.

Parameters

Name Key Required Type Description
Waypoint 1
wp.0 True string

Starting waypoint as latitude,longitude (e.g. 47.610,-122.107).

Waypoint 2
wp.1 True string

Ending waypoint as latitude,longitude (e.g. 47.612,-122.204).

Travel mode
travelMode string

The mode of travel for the route.

Avoid highways
avoid_highways boolean

Avoids the use of highways in the route.

Avoid tolls
avoid_tolls boolean

Avoids the use of toll roads in the route.

Avoid ferries
avoid_ferry boolean

Avoids the use of ferries in the route.

Avoid crossing country borders
avoid_borderCrossing boolean

Avoids crossing country borders in the route.

Optimize
optimize string

Specifies what to optimize the route for.

Returns

Get static map (Preview)

Get a static map image centered on a point. GIF is not supported; use JPEG or PNG.

Parameters

Name Key Required Type Description
Center latitude
latitude True double

The latitude of the map center. Example: 47.64054

Center longitude
longitude True double

The longitude of the map center. Example: -122.12934

Map style
imagerySet True string

The map style to display.

Zoom level
zoomLevel True string

The zoom level between 0 and 20. Default: 10

Width (pixels)
width integer

The width of the output image in pixels. Default: 512

Height (pixels)
height integer

The height of the output image in pixels. Default: 512

Image format
format string

The image format. Default: png

Pushpin latitude
pushpinLatitude double

Pushpin latitude.

Pushpin longitude
pushpinLongitude double

Pushpin longitude.

Pushpin label
pushpinLabel string

Pushpin label (up to 3 characters).

Returns

response
GetMap_Response

Definitions

GetRoute_Response

Name Path Type Description
Type
type string

GeoJSON type (always FeatureCollection).

Features
features array of object

Array of GeoJSON features: Waypoint (start/end), ManeuverPoint (turn-by-turn steps), and RoutePath (route summary).

Feature Type
features.type string
Geometry
features.geometry object
Feature Kind
features.properties.type string

Feature kind: Waypoint (start/end points), ManeuverPoint (turn-by-turn step), or RoutePath (overall route summary).

Distance (meters)
features.properties.distanceInMeters float

Total route distance in meters. Present on RoutePath features.

Duration (seconds)
features.properties.durationInSeconds integer

Estimated travel time in seconds (without traffic). Present on RoutePath features.

Traffic Delay (seconds)
features.properties.trafficDelayInSeconds integer

Extra time in seconds due to traffic. Present on RoutePath features.

Traffic Congestion
features.properties.trafficCongestion string

Traffic congestion level (e.g. Low, Medium, High). Present on RoutePath features.

Traffic Data Used
features.properties.trafficDataUsed string

Type of traffic data used (e.g. None, Flow). Present on RoutePath features.

Departure At
features.properties.departureAt string

Estimated departure time (ISO 8601). Present on RoutePath features.

Arrival At
features.properties.arrivalAt string

Estimated arrival time (ISO 8601). Present on RoutePath features.

Instruction Text
features.properties.instruction.text string

Human-readable instruction text (e.g. 'Turn left onto NE 8th St').

Maneuver Type
features.properties.instruction.maneuverType string

Maneuver type code (e.g. TurnLeft, TurnRight, Straight, ArriveFinish).

Waypoint Index
features.properties.order.inputIndex integer

Index of the corresponding input waypoint (0 = start, 1 = end).

Leg Index
features.properties.order.legIndex integer

Index of the route leg this feature belongs to.

GetLocationByAddress_Response

Name Path Type Description
Type
type string

GeoJSON type (always FeatureCollection).

Features
features array of object

Array of geocoded location features.

Feature Type
features.type string
Geometry Type
features.geometry.type string
Coordinates
features.geometry.coordinates array of double

Coordinates as [longitude, latitude].

Feature Kind
features.properties.type string

Feature kind: Address or PopulatedPlace.

Confidence
features.properties.confidence string

Confidence level of the match (High, Medium, Low).

Match Codes
features.properties.matchCodes array of string

Match codes (Good, Ambiguous, UpHierarchy).

Address Line
features.properties.address.addressLine string

Street address line.

Locality (City)
features.properties.address.locality string

City or locality.

Admin Districts
features.properties.address.adminDistricts array of object

Array of administrative districts (e.g. state, county).

Short Name
features.properties.address.adminDistricts.shortName string
Name
features.properties.address.adminDistricts.name string
Postal Code
features.properties.address.postalCode string

Postal or ZIP code.

Country Region
features.properties.address.countryRegion string

Country or region name.

Formatted Address
features.properties.address.formattedAddress string

Complete formatted address string.

GetMap_Response

Map Image
binary