Skip to content

Commit db42b44

Browse files
authored
Update README.md
1 parent 332e811 commit db42b44

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

Identity/README.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
Instructions below are relative to the .\Identity folder of the AzureStack-Tools repo.
1+
// Place your settings in this file to overwrite the default settings
2+
{
3+
"workbench.colorTheme": "Abyss"
4+
}nstall-Module -Name 'AzureRm.Bootstrapper' -Scope CurrentUser
5+
Install-AzureRmProfile -profile '2017-03-09-profile' -Force -Scope CurrentUser
6+
Install-Module -Name AzureStack -RequiredVersion 1.2.9 -Scope CurrentUser
7+
```
28
39
Then make sure the following modules are imported:
410
@@ -7,12 +13,23 @@ Import-Module ..\Connect\AzureStack.Connect.psm1
713
Import-Module ..\Identity\AzureStack.Identity.psm1
814
```
915

10-
# Creating a Service Principal in a disconnected (AD FS) topology
16+
## Getting the directory tenant identifier from the Identity System
17+
18+
This function is used to get the Directory Tenant Guid. This method works for both AAD and AD FS.
19+
20+
```powershell
21+
$directoryTenantId = Get-AzsDirectoryTenantIdentifier -Authority "<DirectoryTenantUrl>"
22+
```
23+
24+
An example of an authority for AAD is `https://login.windows.net/microsoft.onmicrosoft.com`
25+
and for AD FS is `https://adfs.local.azurestack.external/adfs`.
26+
27+
## Creating a Service Principal in a disconnected (AD FS) topology
1128

1229
You can create a Service Principal by executing the following command after importing the Identity module
1330

1431
```powershell
15-
$servicePrincipal = New-AzsAdGraphServicePrincipal -DisplayName "<YourServicePrincipalName>" -AdminCredential $(Get-Credential) -ADFSMachineName "AZS-ADFS01" -Verbose
32+
$servicePrincipal = New-AzsAdGraphServicePrincipal -DisplayName "<YourServicePrincipalName>" -AdminCredential $(Get-Credential) -Verbose
1633
```
1734

1835
After the Service Principal is created, you should open your Azure Stack Portal to provide the appropriate level of RBAC to it. You can do this from the Access Control (IAM) tab of any resource. After the RBAC is given, you can login using the service principal as follows:
@@ -21,17 +38,17 @@ After the Service Principal is created, you should open your Azure Stack Portal
2138
Add-AzureRmAccount -EnvironmentName "<AzureStackEnvironmentName>" -ServicePrincipal -CertificateThumbprint $servicePrincipal.Thumbprint -ApplicationId $servicePrincipal.ApplicationId -TenantId $directoryTenantId
2239
```
2340

24-
# Enabling AAD Multi-Tenancy in Azure Stack
41+
## Enabling AAD Multi-Tenancy in Azure Stack
2542

2643
Allowing users and service principals from multiple AAD directory tenants to sign in and create resources on Azure Stack.
2744
There are two personas involved in implementing this scenario.
2845

2946
1. The Administrator of the Azure Stack installation
3047
1. The Directory Tenant Administrator of the directory that needs to be onboarded to Azure Stack
3148

32-
## Azure Stack Administrator
49+
### Azure Stack Administrator
3350

34-
### Step 1: Onboard the Guest Directory Tenant to Azure Stack
51+
#### Step 1: Onboard the Guest Directory Tenant to Azure Stack
3552

3653
This step will let Azure Resource manager know that it can accept users and service principals from the guest directory tenant.
3754

@@ -40,19 +57,19 @@ $adminARMEndpoint = "https://adminmanagement.<region>.<domain>"
4057
$azureStackDirectoryTenant = "<homeDirectoryTenant>.onmicrosoft.com" # this is the primary tenant Azure Stack is registered to
4158
$guestDirectoryTenantToBeOnboarded = "<guestDirectoryTenant>.onmicrosoft.com" # this is the new tenant that needs to be onboarded to Azure Stack
4259
$location = "local"
60+
4361
Register-AzsGuestDirectoryTenant -AdminResourceManagerEndpoint $adminARMEndpoint `
4462
-DirectoryTenantName $azureStackDirectoryTenant `
4563
-GuestDirectoryTenantName $guestDirectoryTenantToBeOnboarded `
64+
-ResourceGroupName "system.local" `
4665
-Location $location
4766
```
4867

4968
With this step, the work of the Azure Stack administrator is done.
5069

51-
## Guest Directory Tenant Administrator
70+
### Guest Directory Tenant Administrator
5271

53-
The following steps need to be completed by the **Directory Tenant Administrator** of the directory that needs to be onboarded to Azure Stack.
54-
55-
### Step 2: Registering Azure Stack applications with the Guest Directory
72+
#### Step 2: Registering Azure Stack applications with the Guest Directory
5673

5774
Execute the following cmdlet as the administrator of the directory that needs to be onboarded, replacing ```$guestDirectoryTenantName``` with your directory domain name
5875

@@ -63,14 +80,3 @@ $guestDirectoryTenantName = "<guestDirectoryTenant>.onmicrosoft.com" # this is t
6380
Register-AzsWithMyDirectoryTenant -TenantResourceManagerEndpoint $tenantARMEndpoint `
6481
-DirectoryTenantName $guestDirectoryTenantName
6582
```
66-
67-
# Getting the directory tenant identifier from the Identity System
68-
69-
This function is used to get the Directory Tenant Guid. This method works for both AAD and AD FS.
70-
71-
```powershell
72-
$directoryTenantId = Get-AzsDirectoryTenantIdentifier -Authority "<DirectoryTenantUrl>"
73-
```
74-
75-
An example of an authority for AAD is `https://login.windows.net/microsoft.onmicrosoft.com`
76-
and for AD FS is `https://adfs.local.azurestack.external/adfs`.

0 commit comments

Comments
 (0)