Skip to content

Commit 8208c79

Browse files
shnatarashnatara
authored andcommitted
Added a Readme
1 parent e87b37e commit 8208c79

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

Identity/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Azure Stack Identity
2+
3+
4+
```powershell
5+
Install-Module -Name AzureRM -RequiredVersion 1.2.8 -Scope CurrentUser
6+
Install-Module -Name AzureStack
7+
```
8+
Then make sure the following modules are imported:
9+
10+
```powershell
11+
Import-Module ..\Connect\AzureStack.Connect.psm1
12+
Import-Module ..\Identity\AzureStack.Identity.psm1
13+
```
14+
15+
You can create a Service Principal by executing the following command after importing the Identity Module
16+
17+
```powershell
18+
$servicePrincipal = New-ADGraphServicePrincipal -DisplayName "myServicePrincipal" -AdminCredential $(Get-Credential) -Verbose
19+
```
20+
21+
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:
22+
23+
```powershell
24+
Add-AzureRmAccount -EnvironmentName AzureStack-Tenant -ServicePrincipal -CertificateThumbprint $servicePrincipal.Thumbprint -ApplicationId $servicePrincipal.ApplicationId -TenantId "<yourTenantId>"
25+
```

0 commit comments

Comments
 (0)