Skip to content

Commit 34abb1a

Browse files
authored
Merge branch 'MicrosoftDocs:main' into main
2 parents 986cf76 + 6fce6af commit 34abb1a

File tree

11 files changed

+960
-91
lines changed

11 files changed

+960
-91
lines changed

articles/active-directory/develop/mobile-app-quickstart-portal-android.md

Lines changed: 480 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
---
2+
title: "Quickstart: Add sign in with Microsoft to an iOS or macOS app | Azure"
3+
titleSuffix: Microsoft identity platform
4+
description: In this quickstart, learn how an iOS or macOS app can sign in users, get an access token from the Microsoft identity platform, and call the Microsoft Graph API.
5+
services: active-directory
6+
author: mmacy
7+
manager: CelesteDG
8+
ms.service: active-directory
9+
ms.subservice: develop
10+
ms.topic: portal
11+
ms.workload: identity
12+
ms.date: 02/15/2022
13+
ROBOTS: NOINDEX
14+
ms.author: marsma
15+
ms.reviewer: jmprieur, saeeda
16+
ms.custom: aaddev, identityplatformtop40, "scenarios:getting-started", "languages:iOS", mode-api
17+
#Customer intent: As an application developer, I want to learn how to sign in users and call Microsoft Graph from my iOS or macOS application.
18+
---
19+
20+
# Quickstart: Sign in users and call the Microsoft Graph API from an iOS or macOS app
21+
22+
In this quickstart, you download and run a code sample that demonstrates how a native iOS or macOS application can sign in users and get an access token to call the Microsoft Graph API.
23+
24+
The quickstart applies to both iOS and macOS apps. Some steps are needed only for iOS apps and will be indicated as such.
25+
26+
## Prerequisites
27+
28+
* An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
29+
* XCode 10+
30+
* iOS 10+
31+
* macOS 10.12+
32+
33+
## How the sample works
34+
35+
![Shows how the sample app generated by this quickstart works](media/quickstart-v2-ios/ios-intro.svg)
36+
37+
#### Step 1: Configure your application
38+
For the code sample for this quickstart to work, add a **Redirect URI** compatible with the Auth broker.
39+
> [!div id="makechanges" class="nextstepaction" class="configure-app-button"]
40+
> [Make this change for me]()
41+
42+
> [!div id="appconfigured" class="alert alert-info"]
43+
> ![Already configured](media/quickstart-v2-ios/green-check.png) Your application is configured with these attributes
44+
45+
#### Step 2: Download the sample project
46+
> [!div class="nextstepaction"]
47+
> [Download the code sample for iOS]()
48+
49+
> [!div class="nextstepaction"]
50+
> [Download the code sample for macOS]()
51+
52+
#### Step 3: Install dependencies
53+
54+
1. Extract the zip file.
55+
2. In a terminal window, navigate to the folder with the downloaded code sample and run `pod install` to install the latest MSAL library.
56+
57+
#### Step 4: Your app is configured and ready to run
58+
We have configured your project with values of your app's properties and it's ready to run.
59+
> [!NOTE]
60+
> `Enter_the_Supported_Account_Info_Here`
61+
62+
1. If you're building an app for [Azure AD national clouds](/graph/deployments#app-registration-and-token-service-root-endpoints), replace the line starting with 'let kGraphEndpoint' and 'let kAuthority' with correct endpoints. For global access, use default values:
63+
64+
```swift
65+
let kGraphEndpoint = "https://graph.microsoft.com/"
66+
let kAuthority = "https://login.microsoftonline.com/common"
67+
```
68+
69+
1. Other endpoints are documented [here](/graph/deployments#app-registration-and-token-service-root-endpoints). For example, to run the quickstart with Azure AD Germany, use following:
70+
71+
```swift
72+
let kGraphEndpoint = "https://graph.microsoft.de/"
73+
let kAuthority = "https://login.microsoftonline.de/common"
74+
```
75+
76+
3. Open the project settings. In the **Identity** section, enter the **Bundle Identifier** that you entered into the portal.
77+
4. Right-click **Info.plist** and select **Open As** > **Source Code**.
78+
5. Under the dict root node, replace `Enter_the_bundle_Id_Here` with the ***Bundle Id*** that you used in the portal. Notice the `msauth.` prefix in the string.
79+
80+
```xml
81+
<key>CFBundleURLTypes</key>
82+
<array>
83+
<dict>
84+
<key>CFBundleURLSchemes</key>
85+
<array>
86+
<string>msauth.Enter_the_Bundle_Id_Here</string>
87+
</array>
88+
</dict>
89+
</array>
90+
```
91+
92+
6. Build and run the app!
93+
94+
## More Information
95+
96+
Read these sections to learn more about this quickstart.
97+
98+
### Get MSAL
99+
100+
MSAL ([MSAL.framework](https://github.com/AzureAD/microsoft-authentication-library-for-objc)) is the library used to sign in users and request tokens used to access an API protected by Microsoft identity platform. You can add MSAL to your application using the following process:
101+
102+
```
103+
$ vi Podfile
104+
```
105+
106+
Add the following to this podfile (with your project's target):
107+
108+
```
109+
use_frameworks!
110+
111+
target 'MSALiOS' do
112+
pod 'MSAL'
113+
end
114+
```
115+
116+
Run CocoaPods installation command:
117+
118+
`pod install`
119+
120+
### Initialize MSAL
121+
122+
You can add the reference for MSAL by adding the following code:
123+
124+
```swift
125+
import MSAL
126+
```
127+
128+
Then, initialize MSAL using the following code:
129+
130+
```swift
131+
let authority = try MSALAADAuthority(url: URL(string: kAuthority)!)
132+
133+
let msalConfiguration = MSALPublicClientApplicationConfig(clientId: kClientID, redirectUri: nil, authority: authority)
134+
self.applicationContext = try MSALPublicClientApplication(configuration: msalConfiguration)
135+
```
136+
137+
> |Where: | Description |
138+
> |---------|---------|
139+
> | `clientId` | The Application ID from the application registered in *portal.azure.com* |
140+
> | `authority` | The Microsoft identity platform. In most of cases this will be `https://login.microsoftonline.com/common` |
141+
> | `redirectUri` | The redirect URI of the application. You can pass 'nil' to use the default value, or your custom redirect URI. |
142+
143+
### For iOS only, additional app requirements
144+
145+
Your app must also have the following in your `AppDelegate`. This lets MSAL SDK handle token response from the Auth broker app when you do authentication.
146+
147+
```swift
148+
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
149+
150+
return MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String)
151+
}
152+
```
153+
154+
> [!NOTE]
155+
> On iOS 13+, if you adopt `UISceneDelegate` instead of `UIApplicationDelegate`, place this code into the `scene:openURLContexts:` callback instead (See [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscenedelegate/3238059-scene?language=objc)).
156+
> If you support both UISceneDelegate and UIApplicationDelegate for compatibility with older iOS, MSAL callback needs to be placed into both places.
157+
158+
```swift
159+
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
160+
161+
guard let urlContext = URLContexts.first else {
162+
return
163+
}
164+
165+
let url = urlContext.url
166+
let sourceApp = urlContext.options.sourceApplication
167+
168+
MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: sourceApp)
169+
}
170+
```
171+
172+
Finally, your app must have an `LSApplicationQueriesSchemes` entry in your ***Info.plist*** alongside the `CFBundleURLTypes`. The sample comes with this included.
173+
174+
```xml
175+
<key>LSApplicationQueriesSchemes</key>
176+
<array>
177+
<string>msauthv2</string>
178+
<string>msauthv3</string>
179+
</array>
180+
```
181+
182+
### Sign in users & request tokens
183+
184+
MSAL has two methods used to acquire tokens: `acquireToken` and `acquireTokenSilent`.
185+
186+
#### acquireToken: Get a token interactively
187+
188+
Some situations require users to interact with Microsoft identity platform. In these cases, the end user may be required to select their account, enter their credentials, or consent to your app's permissions. For example,
189+
190+
* The first time users sign in to the application
191+
* If a user resets their password, they'll need to enter their credentials
192+
* When your application is requesting access to a resource for the first time
193+
* When MFA or other Conditional Access policies are required
194+
195+
```swift
196+
let parameters = MSALInteractiveTokenParameters(scopes: kScopes, webviewParameters: self.webViewParamaters!)
197+
self.applicationContext!.acquireToken(with: parameters) { (result, error) in /* Add your handling logic */}
198+
```
199+
200+
> |Where:| Description |
201+
> |---------|---------|
202+
> | `scopes` | Contains the scopes being requested (that is, `[ "user.read" ]` for Microsoft Graph or `[ "<Application ID URL>/scope" ]` for custom web APIs (`api://<Application ID>/access_as_user`) |
203+
204+
#### acquireTokenSilent: Get an access token silently
205+
206+
Apps shouldn't require their users to sign in every time they request a token. If the user has already signed in, this method allows apps to request tokens silently.
207+
208+
```swift
209+
self.applicationContext!.getCurrentAccount(with: nil) { (currentAccount, previousAccount, error) in
210+
211+
guard let account = currentAccount else {
212+
return
213+
}
214+
215+
let silentParams = MSALSilentTokenParameters(scopes: self.kScopes, account: account)
216+
self.applicationContext!.acquireTokenSilent(with: silentParams) { (result, error) in /* Add your handling logic */}
217+
}
218+
```
219+
220+
> |Where: | Description |
221+
> |---------|---------|
222+
> | `scopes` | Contains the scopes being requested (that is, `[ "user.read" ]` for Microsoft Graph or `[ "<Application ID URL>/scope" ]` for custom web APIs (`api://<Application ID>/access_as_user`) |
223+
> | `account` | The account a token is being requested for. This quickstart is about a single account application. If you want to build a multi-account app you'll need to define logic to identify which account to use for token requests using `accountsFromDeviceForParameters:completionBlock:` and passing correct `accountIdentifier` |
224+
225+
[!INCLUDE [Help and support](../../../includes/active-directory-develop-help-support-include.md)]
226+
227+
## Next steps
228+
229+
Move on to the step-by-step tutorial in which you build an iOS or macOS app that gets an access token from the Microsoft identity platform and uses it to call the Microsoft Graph API.
230+
231+
> [!div class="nextstepaction"]
232+
> [Tutorial: Sign in users and call Microsoft Graph from an iOS or macOS app](tutorial-v2-ios.md)

articles/azure-sql/database/ledger-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Ledger provides a solution for these networks. Participants can verify the integ
4747

4848
### Trusted off-chain storage for blockchain
4949

50-
When a blockchain network is necessary for a multiple-party business process, the ability query the data on the blockchain without sacrificing performance is a challenge.
50+
When a blockchain network is necessary for a multiple-party business process, the ability to query the data on the blockchain without sacrificing performance is a challenge.
5151

5252
Typical patterns for solving this problem involve replicating data from the blockchain to an off-chain store, such as a database. But after the data is replicated to the database from the blockchain, the data integrity guarantees that a blockchain offer is lost. Ledger provides data integrity for off-chain storage of blockchain networks, which helps ensure complete data trust through the entire system.
5353

articles/backup/backup-azure-restore-files-from-vm.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ To restore files or folders from the recovery point, go to the virtual machine a
5454

5555
## Step 2: Ensure the machine meets the requirements before executing the script
5656

57-
After the script is successfully downloaded, make sure you have the right machine to execute this script. The VM where you are planning to execute the script, should not have any of the following unsupported configurations. **If it does, then choose an alternate machine preferably from the same region that meets the requirements**.
57+
After the script is successfully downloaded, make sure you have the right machine to execute this script. The VM where you are planning to execute the script, should not have any of the following unsupported configurations. **If it does, then choose an alternate machine that meets the requirements**.
5858

5959
### Dynamic disks
6060

@@ -107,11 +107,6 @@ In Linux, the OS of the computer used to restore files must support the file sys
107107
| SLES | 12 and above |
108108
| openSUSE | 42.2 and above |
109109

110-
> [!NOTE]
111-
> We've found some issues in running the file recovery script on machines with SLES 12 SP4 OS and we're investigating with the SLES team.
112-
> Currently, running the file recovery script is working on machines with SLES 12 SP2 and SP3 OS versions.
113-
>
114-
115110
The script also requires Python and bash components to execute and connect securely to the recovery point.
116111

117112
|Component | Version |
@@ -184,10 +179,10 @@ If the file recovery process hangs after you run the file-restore script (for ex
184179
![Registry key changes](media/backup-azure-restore-files-from-vm/iscsi-reg-key-changes.png)
185180

186181
```registry
187-
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\TimeOutValue – change this from 60 to 1200 secs.
188-
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e97b-e325-11ce-bfc1-08002be10318}\0003\Parameters\SrbTimeoutDelta – change this from 15 to 1200 secs.
182+
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\TimeOutValue – change this from 60 to 2400 secs.
183+
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e97b-e325-11ce-bfc1-08002be10318}\0003\Parameters\SrbTimeoutDelta – change this from 15 to 2400 secs.
189184
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e97b-e325-11ce-bfc1-08002be10318}\0003\Parameters\EnableNOPOut – change this from 0 to 1
190-
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e97b-e325-11ce-bfc1-08002be10318}\0003\Parameters\MaxRequestHoldTime - change this from 60 to 1200 secs.
185+
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e97b-e325-11ce-bfc1-08002be10318}\0003\Parameters\MaxRequestHoldTime - change this from 60 to 2400 secs.
191186
```
192187

193188
### For Linux

articles/cognitive-services/language-service/custom-named-entity-recognition/includes/quickstarts/rest-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ Use the following header to authenticate your request.
289289

290290
### Request body
291291

292-
Use the following JSON in your request. The model will be named `MyModel` once training is complete.
292+
Use the following JSON in your request. Use the name of the model you wan to deploy.
293293

294294
```json
295295
{

articles/cognitive-services/language-service/text-analytics-for-health/overview.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: language-service
1010
ms.topic: overview
11-
ms.date: 11/19/2021
11+
ms.date: 02/16/2022
1212
ms.author: aahi
1313
ms.custom: language-service-health, ignite-fall-2021
1414
---
@@ -19,34 +19,50 @@ ms.custom: language-service-health, ignite-fall-2021
1919

2020
Text Analytics for health is one of the features offered by [Azure Cognitive Service for Language](../overview.md), a collection of machine learning and AI algorithms in the cloud for developing intelligent applications that involve written language.
2121

22-
Text Analytics for health extracts and labels relevant medical information from unstructured texts such as doctor's notes, discharge summaries, clinical documents, and electronic health records.
23-
2422
This documentation contains the following types of articles:
2523

2624
* [**Quickstarts**](quickstart.md) are getting-started instructions to guide you through making requests to the service.
2725
* [**How-to guides**](how-to/call-api.md) contain instructions for using the service in more specific or customized ways.
2826
* The [**conceptual articles**](concepts/health-entity-categories.md) provide in-depth explanations of the service's functionality and features.
2927

30-
> [!VIDEO https://docs.microsoft.com/Shows/AI-Show/Introducing-Text-Analytics-for-Health/player]
28+
## Text Analytics for health features
3129

32-
## Features
30+
Text Analytics for health extracts and labels relevant medical information from unstructured texts such as doctor's notes, discharge summaries, clinical documents, and electronic health records.
3331

3432
[!INCLUDE [Text Analytics for health](includes/features.md)]
3533

36-
[!INCLUDE [Typical workflow for pre-configured language features](../includes/overview-typical-workflow.md)]
34+
> [!VIDEO https://docs.microsoft.com/Shows/AI-Show/Introducing-Text-Analytics-for-Health/player]
35+
36+
## Get started with Text analytics for health
37+
38+
To use this feature, you submit raw unstructured text for analysis and handle the API output in your application. Analysis is performed as-is, with no additional customization to the model used on your data. There are three ways to use Text Analytics for health:
3739

38-
## Deploy on premises using Docker containers
3940

40-
Use the available Docker container to [deploy this feature on-premises](how-to/use-containers.md). These docker containers enable you to bring the service closer to your data for compliance, security, or other operational reasons.
41+
|Development option |Description | Links |
42+
|---------|---------|---------|
43+
| Language Studio | A web-based platform that enables you to try Text Analytics for health without needing writing code. |[Language Studio website](https://language.cognitive.azure.com/tryout/healthAnalysis) <br> • [Quickstart: Use the Language studio](../language-studio.md) |
44+
| REST API or Client library (Azure SDK) | Integrate Text Analytics for health into your applications using the REST API, or the client library available in a variety of languages. |[Quickstart: Use Text Analytics for health](quickstart.md) |
45+
| Docker container | Use the available Docker container to deploy this feature on-premises, letting you bring the service closer to your data for compliance, security, or other operational reasons. |[How to deploy on-premises](how-to/use-containers.md) |
46+
47+
## Input requirements and service limits
48+
49+
* Text Analytics for health takes raw unstructured text for analysis. See the [data and service limits](how-to/call-api.md#data-limits) in the how-to guide for more information.
50+
* Text Analytics for health works with a variety of written languages. See [language support](language-support.md) for more information.
51+
52+
## Reference documentation and code samples
53+
54+
As you use Text Analytics for health in your applications, see the following reference documentation and samples for Azure Cognitive Services for Language:
55+
56+
|Development option / language |Reference documentation |Samples |
57+
|---------|---------|---------|
58+
|REST API | [REST API documentation](https://westus2.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-2-Preview-2/operations/Analyze) | |
59+
|C# | [C# documentation](/dotnet/api/azure.ai.textanalytics?view=azure-dotnet-preview&preserve-view=true) | [C# samples](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/textanalytics/Azure.AI.TextAnalytics/samples) |
60+
| Java | [Java documentation](/java/api/overview/azure/ai-textanalytics-readme?view=azure-java-preview&preserve-view=true) | [Java Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/textanalytics/azure-ai-textanalytics/src/samples) |
61+
|JavaScript | [JavaScript documentation](/javascript/api/overview/azure/ai-text-analytics-readme?view=azure-node-preview&preserve-view=true) | [JavaScript samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/textanalytics/ai-text-analytics/samples/v5) |
62+
|Python | [Python documentation](/python/api/overview/azure/ai-textanalytics-readme?view=azure-python-preview&preserve-view=true) | [Python samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/textanalytics/azure-ai-textanalytics/samples) |
4163

4264
## Responsible AI
4365

4466
An AI system includes not only the technology, but also the people who will use it, the people who will be affected by it, and the environment in which it is deployed. Read the [transparency note for Text Analytics for health](/legal/cognitive-services/language-service/transparency-note-health?context=/azure/cognitive-services/language-service/context/context) to learn about responsible AI use and deployment in your systems. You can also see the following articles for more information:
4567

4668
[!INCLUDE [Responsible AI links](../includes/overview-responsible-ai-links.md)]
47-
48-
## Next steps
49-
50-
There are two ways to get started using the entity linking feature:
51-
* [Language Studio](../language-studio.md), which is a web-based platform that enables you to try several Azure Cognitive Service for Language features without needing to write code.
52-
* The [quickstart article](quickstart.md) for instructions on making requests to the service using the REST API and client library SDK.

0 commit comments

Comments
 (0)