You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/service-fabric/service-fabric-cluster-creation-setup-aad.md
+14-23Lines changed: 14 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ We'll use the scripts to create two Azure AD applications to control access to t
46
46
47
47
### SetupApplications.ps1
48
48
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:
50
50
- ClusterName_Cluster
51
51
- ClusterName_Client
52
52
@@ -61,9 +61,9 @@ Run `SetupApplications.ps1`, provide the tenant ID, cluster name, web applicatio
61
61
62
62
-**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`
63
63
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.
65
65
66
-
Example api scheme: api://0e3d2646-78b3-4711-b8be-74a381d9890c/mysftestcluster
66
+
Example API scheme: api://0e3d2646-78b3-4711-b8be-74a381d9890c/mysftestcluster
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).
> 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.
169
169
170
-
---
171
170
172
171
## Granting admin consent
173
172
174
173
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.


179
178
180
-
---
181
179
182
180
## Verifying Azure AD Configuration
183
181
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.
185
183
186
184
187
185
## Troubleshooting help in setting up Azure Active Directory
188
186
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.
190
188
191
189
> [!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.
[](https://shell.azure.com/powershell)
195
193
196
-
---
197
194
198
195
### **Request_BadRequest**
199
196
@@ -238,7 +235,6 @@ Configuration changes have not propagated. Scripts will retry on certain request
238
235
239
236
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.
240
237
241
-
---
242
238
243
239
### **Service Fabric Explorer prompts you to select a certificate**
244
240
#### **Problem**
@@ -252,7 +248,6 @@ The user is not assigned a role in the Azure AD cluster application. Thus, Azure
252
248
#### **Solution**
253
249
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.
254
250
255
-
---
256
251
257
252
### **Connection with PowerShell fails with an error: "The specified credentials are invalid"**
258
253
#### **Problem**
@@ -261,7 +256,6 @@ When you use PowerShell to connect to the cluster by using "AzureActiveDirectory
261
256
#### **Solution**
262
257
This solution is the same as the preceding one.
263
258
264
-
---
265
259
266
260
### **Service Fabric Explorer returns a failure when you sign in: "AADSTS50011"**
267
261
@@ -278,7 +272,6 @@ On the Azure AD app registration page for your cluster, select **Authentication*
### **Connecting to the cluster using Azure AD authentication via PowerShell gives an error when you sign in: "AADSTS50011"**
284
277
#### **Problem**
@@ -290,13 +283,12 @@ Similar to the preceding issue, PowerShell attempts to authenticate against Azur
290
283
#### **Solution**
291
284
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.
292
285
293
-
---
294
286
295
287
### **Execution of script results in error in Authorization error**
296
288
297
289
#### **Problem**
298
290
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:
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.
329
321
330
322
#### **Solution**
331
323
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.
333
325
334
-
---
335
326
336
327
### **Connect the cluster by using Azure AD authentication via PowerShell**
337
328
To connect the Service Fabric cluster, use the following PowerShell command example:
0 commit comments