Skip to content

Commit 1b1820a

Browse files
authored
Merge pull request #199782 from MicrosoftDocs/main
Merge main to live, 4 AM
2 parents 6df42a1 + b435a70 commit 1b1820a

File tree

104 files changed

+1890
-909
lines changed

Some content is hidden

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

104 files changed

+1890
-909
lines changed

.openpublishing.publish.config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@
3232
"need_preview_pull_request": true,
3333
"contribution_branch_mappings": {},
3434
"dependent_repositories": [
35+
{
36+
"path_to_root": "azure-dev-docs-pr",
37+
"url": "https://github.com/MicrosoftDocs/azure-dev-docs-pr",
38+
"branch": "main",
39+
"branch_mapping": {}
40+
},
41+
{
42+
"path_to_root": "terraform_samples",
43+
"url": "https://github.com/Azure/terraform",
44+
"branch": "master",
45+
"branch_mapping": {}
46+
},
3547
{
3648
"path_to_root": "quickstart-templates",
3749
"url": "https://github.com/Azure/azure-quickstart-templates",

.openpublishing.redirection.azure-monitor.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@
119119
"source_path_from_root": "/articles/azure-monitor/alerts/activity-log-alerts.md" ,
120120
"redirect_url": "/azure/azure-monitor/alerts/alert-types.md#activity-log-alerts",
121121
"redirect_document_id": false
122+
},
123+
{
124+
"source_path_from_root": "/articles/azure-monitor/insights/data-explorer.md" ,
125+
"redirect_url": "/azure/data-explorer/data-explorer-insights",
126+
"redirect_document_id": false
122127
}
123128
]
124129
}

articles/active-directory/develop/developer-glossary.md

Lines changed: 57 additions & 59 deletions
Large diffs are not rendered by default.

articles/active-directory/develop/tutorial-v2-ios.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
---
2-
title: "Tutorial: Create an iOS or macOS app that uses the Microsoft identity platform for authentication | Azure"
3-
titleSuffix: Microsoft identity platform
4-
description: In this tutorial, you build an iOS or macOS app that uses the Microsoft identity platform to sign in users and get an access token to call the Microsoft Graph API on their behalf.
5-
services: active-directory
2+
title: "Tutorial: Create an iOS or macOS app that uses the Microsoft identity platform for authentication"
3+
description: Build an iOS or macOS app that uses the Microsoft identity platform to sign in users and get an access token to call the Microsoft Graph API on their behalf.
64
author: mmacy
75
manager: CelesteDG
86

97
ms.service: active-directory
108
ms.subservice: develop
119
ms.topic: tutorial
12-
ms.workload: identity
13-
ms.date: 09/18/2020
10+
ms.date: 05/28/2022
1411
ms.author: marsma
1512
ms.reviewer: oldalton
1613
ms.custom: aaddev, identityplatformtop40, has-adal-ref
@@ -20,7 +17,7 @@ ms.custom: aaddev, identityplatformtop40, has-adal-ref
2017

2118
In this tutorial, you build an iOS or macOS app that integrates with the Microsoft identity platform to sign users and get an access token to call the Microsoft Graph API.
2219

23-
When you've completed the guide, your application will accept sign-ins of personal Microsoft accounts (including outlook.com, live.com, and others) and work or school accounts from any company or organization that uses Azure Active Directory. This tutorial is applicable to both iOS and macOS apps. Some steps are different between the two platforms.
20+
When you've completed the tutorial, your application will accept sign-ins of personal Microsoft accounts (including outlook.com, live.com, and others) and work or school accounts from any company or organization that uses Azure Active Directory. This tutorial is applicable to both iOS and macOS apps. Some steps are different between the two platforms.
2421

2522
In this tutorial:
2623

@@ -75,8 +72,8 @@ If you'd like to download a completed version of the app you build in this tutor
7572
1. Select **Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)** under **Supported account types**.
7673
1. Select **Register**.
7774
1. Under **Manage**, select **Authentication** > **Add a platform** > **iOS/macOS**.
78-
1. Enter your project's Bundle ID. If you downloaded the code, this is `com.microsoft.identitysample.MSALiOS`. If you're creating your own project, select your project in Xcode and open the **General** tab. The bundle identifier appears in the **Identity** section.
79-
1. Select **Configure** and save the **MSAL Configuration** that appears in the **MSAL configuration** page so you can enter it when you configure your app later.
75+
1. Enter your project's Bundle ID. If downloaded the code sample, the Bundle ID is `com.microsoft.identitysample.MSALiOS`. If you're creating your own project, select your project in Xcode and open the **General** tab. The bundle identifier appears in the **Identity** section.
76+
1. Select **Configure** and save the **MSAL Configuration** that appears in the **MSAL configuration** page so you can enter it when you configure your app later.
8077
1. Select **Done**.
8178

8279
## Add MSAL
@@ -85,7 +82,7 @@ Choose one of the following ways to install the MSAL library in your app:
8582

8683
### CocoaPods
8784

88-
1. If you're using [CocoaPods](https://cocoapods.org/), install `MSAL` by first creating an empty file called `podfile` in the same folder as your project's `.xcodeproj` file. Add the following to `podfile`:
85+
1. If you're using [CocoaPods](https://cocoapods.org/), install `MSAL` by first creating an empty file called _podfile_ in the same folder as your project's _.xcodeproj_ file. Add the following to _podfile_:
8986

9087
```
9188
use_frameworks!
@@ -96,18 +93,18 @@ Choose one of the following ways to install the MSAL library in your app:
9693
```
9794

9895
2. Replace `<your-target-here>` with the name of your project.
99-
3. In a terminal window, navigate to the folder that contains the `podfile` you created and run `pod install` to install the MSAL library.
96+
3. In a terminal window, navigate to the folder that contains the _podfile_ you created and run `pod install` to install the MSAL library.
10097
4. Close Xcode and open `<your project name>.xcworkspace` to reload the project in Xcode.
10198

10299
### Carthage
103100

104-
If you're using [Carthage](https://github.com/Carthage/Carthage), install `MSAL` by adding it to your `Cartfile`:
101+
If you're using [Carthage](https://github.com/Carthage/Carthage), install `MSAL` by adding it to your _Cartfile_:
105102

106103
```
107104
github "AzureAD/microsoft-authentication-library-for-objc" "master"
108105
```
109106

110-
From a terminal window, in the same directory as the updated `Cartfile`, run the following command to have Carthage update the dependencies in your project.
107+
From a terminal window, in the same directory as the updated _Cartfile_, run the following command to have Carthage update the dependencies in your project.
111108

112109
iOS:
113110

@@ -129,13 +126,13 @@ You can also use Git Submodule, or check out the latest release to use as a fram
129126

130127
Next, we'll add your app registration to your code.
131128

132-
First, add the following import statement to the top of the `ViewController.swift`, as well as `AppDelegate.swift` or `SceneDelegate.swift` files:
129+
First, add the following import statement to the top of the _ViewController.swift_ file and either _AppDelegate.swift_ or _SceneDelegate.swift_:
133130

134131
```swift
135132
import MSAL
136133
```
137134

138-
Then Add the following code to `ViewController.swift` prior to `viewDidLoad()`:
135+
Next, add the following code to _ViewController.swift_ before to `viewDidLoad()`:
139136

140137
```swift
141138
// Update the below to your client ID you received in the portal. The below is for running the demo only
@@ -151,7 +148,7 @@ var webViewParameters : MSALWebviewParameters?
151148
var currentAccount: MSALAccount?
152149
```
153150

154-
The only value you modify above is the value assigned to `kClientID`to be your [Application ID](./developer-glossary.md#application-id-client-id). This value is part of the MSAL Configuration data that you saved during the step at the beginning of this tutorial to register the application in the Azure portal.
151+
The only value you modify above is the value assigned to `kClientID` to be your [Application ID](./developer-glossary.md#application-client-id). This value is part of the MSAL Configuration data that you saved during the step at the beginning of this tutorial to register the application in the Azure portal.
155152

156153
## Configure Xcode project settings
157154

@@ -161,9 +158,9 @@ Add a new keychain group to your project **Signing & Capabilities**. The keychai
161158

162159
## For iOS only, configure URL schemes
163160

164-
In this step, you will register `CFBundleURLSchemes` so that the user can be redirected back to the app after sign in. By the way, `LSApplicationQueriesSchemes` also allows your app to make use of Microsoft Authenticator.
161+
In this step, you'll register `CFBundleURLSchemes` so that the user can be redirected back to the app after sign in. By the way, `LSApplicationQueriesSchemes` also allows your app to make use of Microsoft Authenticator.
165162

166-
In Xcode, open `Info.plist` as a source code file, and add the following inside of the `<dict>` section. Replace `[BUNDLE_ID]` with the value you used in the Azure portal. If you downloaded the code, the bundle identifier is `com.microsoft.identitysample.MSALiOS`. If you're creating your own project, select your project in Xcode and open the **General** tab. The bundle identifier appears in the **Identity** section.
163+
In Xcode, open _Info.plist_ as a source code file, and add the following inside of the `<dict>` section. Replace `[BUNDLE_ID]` with the value you used in the Azure portal. If you downloaded the code, the bundle identifier is `com.microsoft.identitysample.MSALiOS`. If you're creating your own project, select your project in Xcode and open the **General** tab. The bundle identifier appears in the **Identity** section.
167164

168165
```xml
169166
<key>CFBundleURLTypes</key>
@@ -189,7 +186,7 @@ In Xcode, open `Info.plist` as a source code file, and add the following inside
189186

190187
## Create your app's UI
191188

192-
Now create a UI that includes a button to call the Microsoft Graph API, another to sign out, and a text view to see some output by adding the following code to the `ViewController`class:
189+
Now create a UI that includes a button to call the Microsoft Graph API, another to sign out, and a text view to see some output by adding the following code to the `ViewController` class:
193190

194191
### iOS UI
195192

@@ -372,7 +369,7 @@ Next, also inside the `ViewController` class, replace the `viewDidLoad()` method
372369

373370
### Initialize MSAL
374371

375-
Add the following `initMSAL` method to the `ViewController` class:
372+
To the `ViewController` class, add the `initMSAL` method:
376373

377374
```swift
378375
func initMSAL() throws {
@@ -390,7 +387,7 @@ Add the following `initMSAL` method to the `ViewController` class:
390387
}
391388
```
392389

393-
Add the following after `initMSAL` method to the `ViewController` class.
390+
Still in the `ViewController` class and after the `initMSAL` method, add the `initWebViewParams` method:
394391

395392
### iOS code:
396393

@@ -408,9 +405,9 @@ func initWebViewParams() {
408405
}
409406
```
410407

411-
### For iOS only, handle the sign-in callback
408+
### Handle the sign-in callback (iOS only)
412409

413-
Open the `AppDelegate.swift` file. To handle the callback after sign-in, add `MSALPublicClientApplication.handleMSALResponse` to the `appDelegate` class like this:
410+
Open the _AppDelegate.swift_ file. To handle the callback after sign-in, add `MSALPublicClientApplication.handleMSALResponse` to the `appDelegate` class like this:
414411

415412
```swift
416413
// Inside AppDelegate...
@@ -421,7 +418,7 @@ func application(_ app: UIApplication, open url: URL, options: [UIApplication.Op
421418

422419
```
423420

424-
**If you are using Xcode 11**, you should place MSAL callback into the `SceneDelegate.swift` instead.
421+
**If you are using Xcode 11**, you should place MSAL callback into the _SceneDelegate.swift_ instead.
425422
If you support both UISceneDelegate and UIApplicationDelegate for compatibility with older iOS, MSAL callback would need to be placed into both files.
426423

427424
```swift
@@ -442,9 +439,9 @@ func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)
442439

443440
Now, we can implement the application's UI processing logic and get tokens interactively through MSAL.
444441

445-
MSAL exposes two primary methods for getting tokens: `acquireTokenSilently()` and `acquireTokenInteractively()`:
442+
MSAL exposes two primary methods for getting tokens: `acquireTokenSilently()` and `acquireTokenInteractively()`.
446443

447-
- `acquireTokenSilently()` attempts to sign in a user and get tokens without any user interaction as long as an account is present. `acquireTokenSilently()` requires providing a valid `MSALAccount` which can be retrieved by using one of MSAL account enumeration APIs. This sample uses `applicationContext.getCurrentAccount(with: msalParameters, completionBlock: {})` to retrieve current account.
444+
- `acquireTokenSilently()` attempts to sign in a user and get tokens without user interaction as long as an account is present. `acquireTokenSilently()` require a valid `MSALAccount` which can be retrieved by using one of MSAL's account enumeration APIs. This tutorial uses `applicationContext.getCurrentAccount(with: msalParameters, completionBlock: {})` to retrieve the current account.
448445

449446
- `acquireTokenInteractively()` always shows UI when attempting to sign in the user. It may use session cookies in the browser or an account in the Microsoft authenticator to provide an interactive-SSO experience.
450447

@@ -513,7 +510,7 @@ Add the following code to the `ViewController` class:
513510

514511
#### Get a token interactively
515512

516-
The following code snippet gets a token for the first time by creating an `MSALInteractiveTokenParameters` object and calling `acquireToken`. Next you will add code that:
513+
The following code snippet gets a token for the first time by creating an `MSALInteractiveTokenParameters` object and calling `acquireToken`. Next you'll add code that:
517514

518515
1. Creates `MSALInteractiveTokenParameters` with scopes.
519516
2. Calls `acquireToken()` with the created parameters.
@@ -812,7 +809,7 @@ Add the following helper methods to the `ViewController` class to complete the s
812809
}
813810
```
814811

815-
### For iOS only, get additional device information
812+
### iOS only: get additional device information
816813

817814
Use following code to read current device configuration, including whether device is configured as shared:
818815

@@ -839,13 +836,13 @@ Use following code to read current device configuration, including whether devic
839836

840837
### Multi-account applications
841838

842-
This app is built for a single account scenario. MSAL also supports multi-account scenarios, but it requires some additional work from apps. You will need to create UI to help users select which account they want to use for each action that requires tokens. Alternatively, your app can implement a heuristic to select which account to use by querying all accounts from MSAL. For example, see `accountsFromDeviceForParameters:completionBlock:` [API](https://azuread.github.io/microsoft-authentication-library-for-objc/Classes/MSALPublicClientApplication.html#/c:objc(cs)MSALPublicClientApplication(im)accountsFromDeviceForParameters:completionBlock:)
839+
This app is built for a single account scenario. MSAL also supports multi-account scenarios, but it requires more application work. You'll need to create UI to help users select which account they want to use for each action that requires tokens. Alternatively, your app can implement a heuristic to select which account to use by querying all accounts from MSAL. For example, see `accountsFromDeviceForParameters:completionBlock:` [API](https://azuread.github.io/microsoft-authentication-library-for-objc/Classes/MSALPublicClientApplication.html#/c:objc(cs)MSALPublicClientApplication(im)accountsFromDeviceForParameters:completionBlock:)
843840

844841
## Test your app
845842

846843
Build and deploy the app to a test device or simulator. You should be able to sign in and get tokens for Azure AD or personal Microsoft accounts.
847844

848-
The first time a user signs into your app, they will be prompted by Microsoft identity to consent to the permissions requested. While most users are capable of consenting, some Azure AD tenants have disabled user consent, which requires admins to consent on behalf of all users. To support this scenario, register your app's scopes in the Azure portal.
845+
The first time a user signs into your app, they'll be prompted by Microsoft identity to consent to the permissions requested. While most users are capable of consenting, some Azure AD tenants have disabled user consent, which requires admins to consent on behalf of all users. To support this scenario, register your app's scopes in the Azure portal.
849846

850847
After you sign in, the app will display the data returned from the Microsoft Graph `/me` endpoint.
851848

articles/active-directory/managed-identities-azure-resources/TOC.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676
href: qs-configure-rest-vm.md
7777
- name: Azure SDKs
7878
href: qs-configure-sdk-windows-vm.md
79+
- name: Using Azure Policy
80+
href: how-to-assign-managed-identity-via-azure-policy.md
7981

8082
- name: Configure managed identities on virtual machine scale sets
8183
items:
@@ -89,6 +91,8 @@
8991
href: qs-configure-template-windows-vmss.md
9092
- name: REST
9193
href: qs-configure-rest-vmss.md
94+
- name: Using Azure Policy
95+
href: how-to-assign-managed-identity-via-azure-policy.md
9296

9397
- name: Use managed identities on VMs
9498
items:
@@ -105,9 +109,7 @@
105109
- name: CLI
106110
href: howto-assign-access-cli.md
107111
- name: PowerShell
108-
href: howto-assign-access-powershell.md
109-
- name: Using Azure Policy
110-
href: how-to-assign-managed-identity-via-azure-policy.md
112+
href: howto-assign-access-powershell.md
111113

112114
- name: Manage user-assigned managed identities
113115
href: how-manage-user-assigned-managed-identities.md

0 commit comments

Comments
 (0)