Skip to content

Commit 5192c04

Browse files
authored
Merge pull request #106136 from MicrosoftDocs/master
Merge master to live 4 PM
2 parents 1fa2bf6 + 0c39705 commit 5192c04

File tree

53 files changed

+1347
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1347
-327
lines changed

articles/active-directory/app-provisioning/use-scim-to-provision-users-and-groups.md

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.workload: identity
1212
ms.tgt_pltfrm: na
1313
ms.devlang: na
1414
ms.topic: conceptual
15-
ms.date: 02/18/2020
15+
ms.date: 03/01/2020
1616
ms.author: mimart
1717
ms.reviewer: arvinh
1818
ms.custom: aaddev;it-pro;seohack1
@@ -757,73 +757,7 @@ TLS 1.2 Cipher Suites minimum bar:
757757
Now that you have desidned your schema and understood the Azure AD SCIM implementation, you can get started developing your SCIM endpoint. Rather than starting from scratch and building the implementation completely on your own, you can rely on a number of open source SCIM libraries published by the SCIM commuinty.
758758
The open source .NET Core [reference code](https://aka.ms/SCIMReferenceCode) published by the Azure AD provisioning team is one such resource that can jump start your development. Once you've built your SCIM endpoint, you'll want to test it out. You can use the collection of [postman tests](https://github.com/AzureAD/SCIMReferenceCode/wiki/Test-Your-SCIM-Endpoint) provided as part of the reference code or run through the sample requests / responses provided [above](https://docs.microsoft.com/azure/active-directory/app-provisioning/use-scim-to-provision-users-and-groups#user-operations).
759759

760-
Here’s how it works:
761-
762-
1. Azure AD provides a common language infrastructure (CLI) library named Microsoft.SystemForCrossDomainIdentityManagement, included with the code samples describe below. System integrators and developers can use this library to create and deploy a SCIM-based web service endpoint that can connect Azure AD to any application’s identity store.
763-
2. Mappings are implemented in the web service to map the standardized user schema to the user schema and protocol required by the application.
764-
3. The endpoint URL is registered in Azure AD as part of a custom application in the application gallery.
765-
4. Users and groups are assigned to this application in Azure AD. Upon assignment, they're put into a queue to be synchronized to the target application. The synchronization process handling the queue runs every 40 minutes.
766-
767-
### Code samples
768-
769-
To make this process easier, [code samples](https://github.com/Azure/AzureAD-BYOA-Provisioning-Samples/tree/master) are provided, which create a SCIM web service endpoint and demonstrate automatic provisioning. The sample is of a provider that maintains a file with rows of comma-separated values representing users and groups.
770-
771-
**Prerequisites**
772-
773-
* Visual Studio 2013 or later
774-
* [Azure SDK for .NET](https://azure.microsoft.com/downloads/)
775-
* Windows machine that supports the ASP.NET framework 4.5 to be used as the SCIM endpoint. This machine must be accessible from the cloud.
776-
* [An Azure subscription with a trial or licensed version of Azure AD Premium](https://azure.microsoft.com/services/active-directory/)
777-
778-
### Getting started
779-
780-
The easiest way to implement a SCIM endpoint that can accept provisioning requests from Azure AD is to build and deploy the code sample that outputs the provisioned users to a comma-separated value (CSV) file.
781-
782-
#### To create a sample SCIM endpoint
783-
784-
1. Download the code sample package at [https://github.com/Azure/AzureAD-BYOA-Provisioning-Samples/tree/master](https://github.com/Azure/AzureAD-BYOA-Provisioning-Samples/tree/master)
785-
1. Unzip the package and place it on your Windows machine at a location such as C:\AzureAD-BYOA-Provisioning-Samples\.
786-
1. In this folder, launch the FileProvisioning\Host\FileProvisioningService.csproj project in Visual Studio.
787-
1. Select **Tools** > **NuGet Package Manager** > **Package Manager Console**, and execute the following commands for the FileProvisioningService project to resolve the solution references:
788-
789-
```powershell
790-
Update-Package -Reinstall
791-
```
792-
793-
1. Build the FileProvisioningService project.
794-
1. Launch the Command Prompt application in Windows (as an Administrator), and use the **cd** command to change the directory to your **\AzureAD-BYOA-Provisioning-Samples\FileProvisioning\Host\bin\Debug** folder.
795-
1. Run the following command, replacing `<ip-address>` with the IP address or domain name of the Windows machine:
796-
797-
```
798-
FileSvc.exe http://<ip-address>:9000 TargetFile.csv
799-
```
800-
801-
1. In Windows under **Windows Settings** > **Network & Internet Settings**, select the **Windows Firewall** > **Advanced Settings**, and create an **Inbound Rule** that allows inbound access to port 9000.
802-
1. If the Windows machine is behind a router, the router needs to be configured to run Network Access Translation between its port 9000 that is exposed to the internet, and port 9000 on the Windows machine. This configuration is required for Azure AD to access this endpoint in the cloud.
803-
804-
#### To register the sample SCIM endpoint in Azure AD
805-
806-
1. Sign in to the [Azure Active Directory portal](https://aad.portal.azure.com).
807-
1. Select **Enterprise applications** from the left pane. A list of all configured apps is shown, including apps that were added from the gallery.
808-
1. Select **+ New application** > **All** > **Non-gallery application**.
809-
1. Enter a name for your application, and select **Add** to create an app object. The application object created is intended to represent the target app you would be provisioning to and implementing single sign-on for, and not just the SCIM endpoint.
810-
1. In the app management screen, select **Provisioning** in the left panel.
811-
1. In the **Provisioning Mode** menu, select **Automatic**.
812-
1. In the **Tenant URL** field, enter the URL of the application's SCIM endpoint. Example: https://api.contoso.com/scim/
813-
814-
1. If the SCIM endpoint requires an OAuth bearer token from an issuer other than Azure AD, then copy the required OAuth bearer token into the optional **Secret Token** field. If this field is left blank, Azure AD includes an OAuth bearer token issued from Azure AD with each request. Apps that use Azure AD as an identity provider can validate this Azure AD-issued token.
815-
1. Select **Test Connection** to have Azure Active Directory attempt to connect to the SCIM endpoint. If the attempt fails, error information is displayed.
816-
817-
> [!NOTE]
818-
> **Test Connection** queries the SCIM endpoint for a user that doesn't exist, using a random GUID as the matching property selected in the Azure AD configuration. The expected correct response is HTTP 200 OK with an empty SCIM ListResponse message
819-
1. If the attempts to connect to the application succeed, then select **Save** to save the admin credentials.
820-
1. In the **Mappings** section, there are two selectable sets of attribute mappings: one for user objects and one for group objects. Select each one to review the attributes that are synchronized from Azure Active Directory to your app. The attributes selected as **Matching** properties are used to match the users and groups in your app for update operations. Select **Save** to commit any changes.
821-
1. Under **Settings**, the **Scope** field defines which users and or groups are synchronized. Select **"Sync only assigned users and groups** (recommended) to only sync users and groups assigned in the **Users and groups** tab.
822-
1. Once your configuration is complete, set the **Provisioning Status** to **On**.
823-
1. Select **Save** to start the Azure AD provisioning service.
824-
1. If syncing only assigned users and groups (recommended), be sure to select the **Users and groups** tab and assign the users or groups you want to sync.
825-
Once the initial cycle has started, you can select **Audit logs** in the left panel to monitor progress, which shows all actions done by the provisioning service on your app. For more information on how to read the Azure AD provisioning logs, see [Reporting on automatic user account provisioning](check-status-user-account-provisioning.md).
826-
The final step in verifying the sample is to open the TargetFile.csv file in the \AzureAD-BYOA-Provisioning-Samples\ProvisioningAgent\bin\Debug folder on your Windows machine. Once the provisioning process is run, this file shows the details of all assigned and provisioned users and groups.
760+
Note: The reference code is intended to help you get started building your SCIM endpoint and is provided "AS IS." Contributions from the community are welcome to help build and maintain the code.
827761

828762
## Step 4: Integrate your SCIM endpoint with the Azure AD SCIM client
829763

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
---
2+
title: Show traffic data on android map | Microsoft Azure Maps
3+
description: In this article you'll learn, how to display traffic data on a map using the Microsoft Azure Maps Android SDK.
4+
author: farah-alyasari
5+
ms.author: v-faalya
6+
ms.date: 02/27/2020
7+
ms.topic: conceptual
8+
ms.service: azure-maps
9+
services: azure-maps
10+
manager: philmea
11+
---
12+
13+
# Show traffic data on the map using Azure Maps Android SDK
14+
15+
Flow data and incidents data are the two types of traffic data that can be displayed on the map. This guide shows you how to display both of these traffic data. Incidents data consists of point and line-based data for things such as constructions, road closures, and accidents. Flow data shows metrics about the flow of traffic on the road.
16+
17+
## Prerequisites
18+
19+
Before you can show traffic on the map, you need to install [Azure Maps Android SDK](https://docs.microsoft.com/azure/azure-maps/how-to-use-android-map-control-library) and load a map.
20+
21+
## Incidents traffic data
22+
23+
You'll need to import the following libraries to call `setTraffic` and `incidents`:
24+
25+
```java
26+
import static com.microsoft.com.azure.maps.mapcontrol.options.TrafficOptions.incidents;
27+
```
28+
29+
The following code snippet shows you how to display traffic data on the map. We pass a boolean value to the `incidents` method, and pass that to the `setTraffic` method.
30+
31+
```java
32+
protected void onCreate(Bundle savedInstanceState) {
33+
super.onCreate(savedInstanceState);
34+
mapControl.getMapAsync(map - > {
35+
map.setTraffic(incidents(true));
36+
}
37+
}
38+
```
39+
40+
## Flow traffic data
41+
42+
You'll first need to import the following libraries to call `setTraffic` and `flow`:
43+
44+
```java
45+
import com.microsoft.azure.maps.mapcontrol.options.TrafficFlow;
46+
import static com.microsoft.azure.maps.mapcontrol.options.TrafficOptions.flow;
47+
```
48+
49+
Use the following code snippet to set traffic flow data. Similar to the code in the previous section, we pass the return value of the `flow` method to the `setTraffic` method. There are four values that can be passed to `flow`, and each value would trigger `flow` to return the respective value. The return value of `flow` will then be passed as the argument to `setTraffic`. See the table below for these four values:
50+
51+
| | |
52+
| :-- | :-- |
53+
| TrafficFlow.NONE | Doesn't display traffic data on the map |
54+
| TrafficFlow.RELATIVE | Shows traffic data that's relative to the free-flow speed of the road |
55+
| TrafficFlow.RELATIVE_DELAY | Displays areas that are slower than the average expected delay |
56+
| TrafficFlow.ABSOLUTE | Shows the absolute speed of all vehicles on the road |
57+
58+
```java
59+
protected void onCreate(Bundle savedInstanceState) {
60+
super.onCreate(savedInstanceState);
61+
mapControl.getMapAsync(map ->
62+
map.setTraffic(flow(TrafficFlow.RELATIVE)));
63+
}
64+
```
65+
66+
## Show incident traffic data by clicking a feature
67+
68+
To obtain the incidents for a specific feature, you can use the code below. When a feature is clicked, the code logic checks for incidents and builds a message about the incident. A message shows up at the bottom of the screen with the details.
69+
70+
1. First, you need to edit **res > layout > activity_main.xml**, so that it looks like the one below. You may replace the `mapcontrol_centerLat`, `mapcontrol_centerLng`, and `mapcontrol_zoom` with your desired values. Recall, the zoom level is a value between 0 and 22. At zoom level 0, the entire world fits on a single tile.
71+
72+
```XML
73+
<?xml version="1.0" encoding="utf-8"?>
74+
<FrameLayout
75+
xmlns:android="http://schemas.android.com/apk/res/android"
76+
xmlns:app="http://schemas.android.com/apk/res-auto"
77+
android:layout_width="match_parent"
78+
android:layout_height="match_parent"
79+
>
80+
81+
<com.microsoft.azure.maps.mapcontrol.MapControl
82+
android:id="@+id/mapcontrol"
83+
android:layout_width="match_parent"
84+
android:layout_height="match_parent"
85+
app:mapcontrol_centerLat="47.6050"
86+
app:mapcontrol_centerLng="-122.3344"
87+
app:mapcontrol_zoom="12"
88+
/>
89+
90+
</FrameLayout>
91+
```
92+
93+
2. Add the following code to your **MainActivity.java** file. The package is included by default, so make sure you keep your package at the top.
94+
95+
```java
96+
package <yourpackagename>;
97+
import androidx.appcompat.app.AppCompatActivity;
98+
99+
import android.os.Bundle;
100+
import android.widget.Toast;
101+
102+
import com.microsoft.azure.maps.mapcontrol.AzureMaps;
103+
import com.microsoft.azure.maps.mapcontrol.MapControl;
104+
import com.mapbox.geojson.Feature;
105+
import com.microsoft.azure.maps.mapcontrol.events.OnFeatureClick;
106+
107+
import com.microsoft.azure.maps.mapcontrol.options.TrafficFlow;
108+
import static com.microsoft.azure.maps.mapcontrol.options.TrafficOptions.flow;
109+
import static com.microsoft.azure.maps.mapcontrol.options.TrafficOptions.incidents;
110+
111+
public class MainActivity extends AppCompatActivity {
112+
113+
static {
114+
AzureMaps.setSubscriptionKey("Your Azure Maps Subscription Key");
115+
}
116+
117+
MapControl mapControl;
118+
119+
@Override
120+
protected void onCreate(Bundle savedInstanceState) {
121+
super.onCreate(savedInstanceState);
122+
setContentView(R.layout.activity_main);
123+
124+
mapControl = findViewById(R.id.mapcontrol);
125+
126+
mapControl.onCreate(savedInstanceState);
127+
128+
//Wait until the map resources are ready.
129+
mapControl.getMapAsync(map -> {
130+
131+
map.setTraffic(flow(TrafficFlow.RELATIVE));
132+
map.setTraffic(incidents(true));
133+
134+
map.events.add((OnFeatureClick) (features) -> {
135+
136+
if (features != null && features.size() > 0) {
137+
Feature incident = features.get(0);
138+
if (incident.properties() != null) {
139+
140+
141+
StringBuilder sb = new StringBuilder();
142+
String incidentType = incident.getStringProperty("incidentType");
143+
if (incidentType != null) {
144+
sb.append(incidentType);
145+
}
146+
if (sb.length() > 0) sb.append("\n");
147+
if ("Road Closed".equals(incidentType)) {
148+
sb.append(incident.getStringProperty("from"));
149+
} else {
150+
String description = incident.getStringProperty("description");
151+
if (description != null) {
152+
for (String word : description.split(" ")) {
153+
if (word.length() > 0) {
154+
sb.append(word.substring(0, 1).toUpperCase());
155+
if (word.length() > 1) {
156+
sb.append(word.substring(1));
157+
}
158+
sb.append(" ");
159+
}
160+
}
161+
}
162+
}
163+
String message = sb.toString();
164+
165+
if (message.length() > 0) {
166+
Toast.makeText(this,message,Toast.LENGTH_LONG).show();
167+
}
168+
}
169+
}
170+
});
171+
});
172+
}
173+
174+
@Override
175+
public void onResume() {
176+
super.onResume();
177+
mapControl.onResume();
178+
}
179+
180+
@Override
181+
protected void onStart(){
182+
super.onStart();
183+
mapControl.onStart();
184+
}
185+
186+
@Override
187+
public void onPause() {
188+
super.onPause();
189+
mapControl.onPause();
190+
}
191+
192+
@Override
193+
public void onStop() {
194+
super.onStop();
195+
mapControl.onStop();
196+
}
197+
198+
@Override
199+
public void onLowMemory() {
200+
super.onLowMemory();
201+
mapControl.onLowMemory();
202+
}
203+
204+
@Override
205+
protected void onDestroy() {
206+
super.onDestroy();
207+
mapControl.onDestroy();
208+
}
209+
210+
@Override
211+
protected void onSaveInstanceState(Bundle outState) {
212+
super.onSaveInstanceState(outState);
213+
mapControl.onSaveInstanceState(outState);
214+
}
215+
}
216+
```
217+
218+
3. Once you incorporate the above code in your application, you'll be able to click on a feature and see the details of the traffic incidents. Depending on the latitude, longitude, and the zoom level values that you used in your **activity_main.xml** file, you'll see results similar to the following image:
219+
220+
<center>
221+
222+
![Incident-traffic-on-the-map](./media/how-to-show-traffic-android/android-traffic.png)
223+
224+
</center>
225+
226+
## Next steps
227+
228+
View the following guides to learn how to add more data to your map:
229+
230+
> [!div class="nextstepaction"]
231+
> [Add a symbol layer](how-to-add-symbol-to-android-map.md)
232+
233+
> [!div class="nextstepaction"]
234+
> [Add a tile layer](how-to-add-tile-layer-android-map.md)
235+
236+
> [!div class="nextstepaction"]
237+
> [Add shapes to android map](how-to-add-shapes-to-android-map.md)
238+
239+
> [!div class="nextstepaction"]
240+
> [Display feature information](display-feature-information-android.md)

articles/azure-maps/how-to-use-android-map-control-library.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ The next step in building your application is to install the Azure Maps Android
122122
```java
123123
package com.example.myapplication;
124124
125-
import android.support.v7.app.AppCompatActivity;
125+
//For older versions use: import android.support.v7.app.AppCompatActivity;
126+
import androidx.appcompat.app.AppCompatActivity;
127+
126128
import android.os.Bundle;
127129
import com.microsoft.azure.maps.mapcontrol.AzureMaps;
128130
import com.microsoft.azure.maps.mapcontrol.MapControl;

articles/azure-maps/index.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ landingContent:
100100
url: how-to-add-tile-layer-android-map.md
101101
- text: Add a shapes to a map
102102
url: how-to-add-shapes-to-android-map.md
103+
- text: Show traffic data
104+
url: how-to-show-traffic-android.md
103105

104106
# Card
105107
- title: Developing with Location-Based Services

0 commit comments

Comments
 (0)