Skip to content

Commit 169c469

Browse files
authored
Apply suggestions from PR review
1 parent e9334f4 commit 169c469

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

articles/service-fabric/service-fabric-cluster-creation-setup-aad.md

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ We'll use the scripts to create two Azure AD applications to control access to t
4646

4747
### SetupApplications.ps1
4848

49-
Run `SetupApplications.ps1`, provide the tenant ID, cluster name, web application uri, and web application reply URL as parameters. Use -remove to remove the app registrations. Using -logFile `<log file path>` will generate a transcript log. See script help (help .\setupApplications.ps1 -full) for additional information. The script creates the web and native applications to represent your Service Fabric cluster. The two new app registration entries will be in the following format:
49+
Run `SetupApplications.ps1` and provide the tenant ID, cluster name, web application URI, and web application reply URL as parameters. Use -remove to remove the app registrations. Using -logFile `<log file path>` will generate a transcript log. See script help (help .\setupApplications.ps1 -full) for additional information. The script creates the web and native applications to represent your Service Fabric cluster. The two new app registration entries will be in the following format:
5050
- ClusterName_Cluster
5151
- ClusterName_Client
5252

@@ -61,9 +61,9 @@ Run `SetupApplications.ps1`, provide the tenant ID, cluster name, web applicatio
6161

6262
- **webApplicationReplyUrl:** *WebApplicationReplyUrl* is the default endpoint that Azure AD returns to your users after they finish signing in. Set this endpoint as the Service Fabric Explorer endpoint for your cluster. If you are creating Azure AD applications to represent an existing cluster, make sure this URL matches your existing cluster's endpoint. If you are creating applications for a new cluster, plan the endpoint your cluster will have and make sure not to use the endpoint of an existing cluster. By default the Service Fabric Explorer endpoint is: `https://<cluster_domain>:19080/Explorer`
6363

64-
- **webApplicationUri:** *WebApplicationUri* is either the uri of a 'verified domain' or uri using api scheme format of api://{{tenant Id}}/{{cluster name}}. See [AppId Uri in single tenant applications will require use of default scheme or verified domains](../active-directory/develop/reference-breaking-changes.md#appid-uri-in-single-tenant-applications-will-require-use-of-default-scheme-or-verified-domains) for additional information.
64+
- **webApplicationUri:** *WebApplicationUri* is either the URI of a 'verified domain' or URI using API scheme format of api://{{tenant Id}}/{{cluster name}}. See [AppId Uri in single tenant applications will require use of default scheme or verified domains](../active-directory/develop/reference-breaking-changes.md#appid-uri-in-single-tenant-applications-will-require-use-of-default-scheme-or-verified-domains) for additional information.
6565

66-
Example api scheme: api://0e3d2646-78b3-4711-b8be-74a381d9890c/mysftestcluster
66+
Example API scheme: api://0e3d2646-78b3-4711-b8be-74a381d9890c/mysftestcluster
6767

6868
#### SetupApplications.ps1 example
6969

@@ -88,7 +88,7 @@ $configObj = .\SetupApplications.ps1 -TenantId $tenantId `
8888
-Verbose
8989
```
9090

91-
The script outputs $configObj variable for subsequent commands and prints the JSON required by the Azure Resource Manager template. Copy the json output and use when creating or modifying existing cluster [create your AAD enabled cluster](service-fabric-cluster-creation-create-template.md#add-azure-ad-configuration-to-use-azure-ad-for-client-access).
91+
The script outputs $configObj variable for subsequent commands and prints the JSON required by the Azure Resource Manager template. Copy the JSON output and use when creating or modifying existing cluster [create your Azure AD enabled cluster](service-fabric-cluster-creation-create-template.md#add-azure-ad-configuration-to-use-azure-ad-for-client-access).
9292

9393
#### SetupApplications.ps1 example output
9494

@@ -165,35 +165,32 @@ $resourceGroupName = 'mysftestcluster'
165165
```
166166

167167
> [!NOTE]
168-
> Update cluster provisioning ARM templates or scripts with new cluster resource AAD configuration changes.
168+
> Update cluster provisioning ARM templates or scripts with new cluster resource Azure AD configuration changes.
169169
170-
---
171170

172171
## Granting admin consent
173172

174173
It may be necessary to 'Grant admin consent' for the 'API permissions' being configured. Navigate to [Azure App registrations](https://ms.portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps) blade and add name of cluster to the filter. For both registrations, open 'API permissions', and select 'Grant admin consent for' if available.
175174

176-
![api-grant](media/service-fabric-cluster-creation-setup-aad/portal-client-api-grant.png)
175+
![Screenshot that shows Grant admin consent selected on the Azure App registrations blade.](media/service-fabric-cluster-creation-setup-aad/portal-client-api-grant.png)
177176

178-
![api-grant-confirm](media/service-fabric-cluster-creation-setup-aad/portal-client-api-grant-confirm.png)
177+
![Screenshot that shows the Grant admin consent confirmation with Yes highlighted.](media/service-fabric-cluster-creation-setup-aad/portal-client-api-grant-confirm.png)
179178

180-
---
181179

182180
## Verifying Azure AD Configuration
183181

184-
Navigate to the Service Fabric Explorer (SFX) url. This should be the same as parameter webApplicationReplyUrl. An Azure authentication dialog should be displayed. Log on with an account configured with new AAD configuration. Verify administrator account has read / write access and user has read access. Any modification to the cluster, for example performing an action is an administrative action.
182+
Navigate to the Service Fabric Explorer (SFX) URL. This should be the same as the parameter webApplicationReplyUrl. An Azure authentication dialog should be displayed. Log on with an account configured with the new Azure AD configuration. Verify that the administrator account has read/write access and that the user has read access. Any modification to the cluster, for example, performing an action, is an administrative action.
185183

186184

187185
## Troubleshooting help in setting up Azure Active Directory
188186

189-
Setting up Azure AD and using it can be challenging, so here are some pointers on what you can do to debug the issue. Powershell transcript logging can be enabled by using the '-logFile' argument on 'SetupApplications.ps1' and 'SetupUser.ps1' scripts to review output.
187+
Setting up Azure AD and using it can be challenging, so here are some pointers on what you can do to debug the issue. PowerShell transcript logging can be enabled by using the '-logFile' argument on 'SetupApplications.ps1' and 'SetupUser.ps1' scripts to review output.
190188

191189
> [!NOTE]
192-
> With migration of Identities platforms (ADAL to MSAL), deprecation of AzureRM in favor of Azure AZ, and supporting multiple versions of PowerShell, dependencies may not always be correct or up to date causing errors in script execution. Running PowerShell commands and scripts from Azure cloud shell reduces the potential for errors with session auto authentication and managed identity.
190+
> With migration of Identities platforms (ADAL to MSAL), deprecation of AzureRM in favor of Azure AZ, and supporting multiple versions of PowerShell, dependencies may not always be correct or up to date causing errors in script execution. Running PowerShell commands and scripts from Azure Cloud Shell reduces the potential for errors with session auto authentication and managed identity.
193191
194-
[![Launch Cloud Shell](../../includes/media/cloud-shell-try-it/hdi-launch-cloud-shell.png)](https://shell.azure.com/powershell)
192+
[![Button that will launch Cloud Shell](../../includes/media/cloud-shell-try-it/hdi-launch-cloud-shell.png)](https://shell.azure.com/powershell)
195193

196-
---
197194

198195
### **Request_BadRequest**
199196

@@ -238,7 +235,6 @@ Configuration changes have not propagated. Scripts will retry on certain request
238235

239236
Scripts will retry on certain requests with HTTP status codes 400 and 404 upto provided '-timeoutMin' which is by default 5 minutes. Script can be re-executed as needed.
240237

241-
---
242238

243239
### **Service Fabric Explorer prompts you to select a certificate**
244240
#### **Problem**
@@ -252,7 +248,6 @@ The user is not assigned a role in the Azure AD cluster application. Thus, Azure
252248
#### **Solution**
253249
Follow the instructions for setting up Azure AD, and assign user roles. Also, we recommend that you turn on "User assignment required to access app," as `SetupApplications.ps1` does.
254250

255-
---
256251

257252
### **Connection with PowerShell fails with an error: "The specified credentials are invalid"**
258253
#### **Problem**
@@ -261,7 +256,6 @@ When you use PowerShell to connect to the cluster by using "AzureActiveDirectory
261256
#### **Solution**
262257
This solution is the same as the preceding one.
263258

264-
---
265259

266260
### **Service Fabric Explorer returns a failure when you sign in: "AADSTS50011"**
267261

@@ -278,7 +272,6 @@ On the Azure AD app registration page for your cluster, select **Authentication*
278272

279273
![Web application reply URL][web-application-reply-url]
280274

281-
---
282275

283276
### **Connecting to the cluster using Azure AD authentication via PowerShell gives an error when you sign in: "AADSTS50011"**
284277
#### **Problem**
@@ -290,13 +283,12 @@ Similar to the preceding issue, PowerShell attempts to authenticate against Azur
290283
#### **Solution**
291284
Use the same process as in the preceding issue, but the URL must be set to `urn:ietf:wg:oauth:2.0:oob`, a special redirect for command-line authentication.
292285

293-
---
294286

295287
### **Execution of script results in error in Authorization error**
296288

297289
#### **Problem**
298290

299-
Powershell script may fail to perform all of the REST commands required to complete AAD configuration with error "Authorization_RequestDenied","Insufficient privileges to complete the operation". Example error:
291+
PowerShell script may fail to perform all of the REST commands required to complete Azure AD configuration with error "Authorization_RequestDenied","Insufficient privileges to complete the operation". Example error:
300292

301293
```powershell
302294
Invoke-WebRequest: /home/<user>/clouddrive/service-fabric-aad-helpers/Common.ps1:239
@@ -325,13 +317,12 @@ Line |
325317

326318
#### **Reason**
327319

328-
This error is returned when the permissions of the user account executing script does not have permissions to perform the REST call. This can occur if user does not have Administrator / Manage / Write permissions for the objects being created or modified.
320+
This error is returned when the user account executing the script doesn't have the permissions to perform the REST call. This can occur if the user doesn't have Administrator/Manage/Write permissions for the objects being created or modified.
329321

330322
#### **Solution**
331323

332-
Work with an Administrator of Azure tenant / Azure Active Directory to complete all remaining actions. The scripts provided are idempotent so can be re-executed to complete process.
324+
Work with an Administrator of Azure tenant/Azure Active Directory to complete all remaining actions. The scripts provided are idempotent so can be re-executed to complete the process.
333325

334-
---
335326

336327
### **Connect the cluster by using Azure AD authentication via PowerShell**
337328
To connect the Service Fabric cluster, use the following PowerShell command example:

0 commit comments

Comments
 (0)