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: AppCreationScripts/AppCreationScripts.md
+46-10Lines changed: 46 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,32 @@
1
1
# Registering the Azure Active Directory applications and updating the configuration files for this sample using PowerShell scripts
2
2
3
+
## Overview
4
+
5
+
### Quick summary
6
+
7
+
1. On Windows run PowerShell and navigate to the root of the cloned directory
8
+
1. In PowerShell run:
9
+
```PowerShell
10
+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
11
+
```
12
+
1. Run the script to create your Azure AD application and configure the code of the sample application accordinly. (Other ways of running the scripts are described below)
13
+
```PowerShell
14
+
.\AppCreationScripts\Configure.ps1
15
+
```
16
+
1. Open the Visual Studio solution and click start
17
+
18
+
### More details
19
+
20
+
The following paragraphs:
21
+
22
+
-[Present the scripts](#presentation-of-the-scripts) and explain their [usage patterns](#usage-pattern-for-tests-and-devops-scenarios) for test and DevOps scenarios.
23
+
- Explain the [pre-requisites](#pre-requisites)
24
+
- Explain [four ways of running the scripts](#four-ways-to-run-the-script):
25
+
-[Interactively](#option-1-interactive) to create the app in your home tenant
26
+
-[Passing credentials](#option-2-non-interactive) to create the app in your home tenant
27
+
-[Interactively in a specific tenant](#option-3-interactive-but-create-apps-in-a-specified-tenant)
28
+
-[Passing credentials in a specific tenant](#option-4-non-interactive-and-create-apps-in-a-specified-tenant)
29
+
3
30
## Goal of the scripts
4
31
5
32
### Presentation of the scripts
@@ -26,21 +53,30 @@ The `Configure.ps1` will stop if it tries to create an Azure AD application whic
26
53
27
54
### Pre-requisites
28
55
29
-
To use the app creation scripts:
30
-
31
56
1. Open PowerShell (On Windows, press `Windows-R` and type `PowerShell` in the search window)
32
57
2. Navigate to the root directory of the project.
33
-
3. Until you change it, the default Execution Policy for scripts is usually `Restricted`. In order to run the PowerShell script you need to set the Execution Policy to `Unrestricted`. You can set this just for the current PowerShell process by running the command:
58
+
3. Until you change it, the default [Execution Policy](https:/go.microsoft.com/fwlink/?LinkID=135170) for scripts is usually `Restricted`. In order to run the PowerShell script you need to set the Execution Policy to `RemoteSigned`. You can set this just for the current PowerShell process by running the command:
34
59
```PowerShell
35
-
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted
60
+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
The scripts install the required PowerShell module (AzureAD) for the current user if needed. However, if you want to install if for all users on the machine, you can follow the following steps:
64
+
37
65
4. If you have never done it already, in the PowerShell window, install the AzureAD PowerShell modules. For this:
38
66
39
67
1. Open PowerShell as admin (On Windows, Search Powershell in the search bar, right click on it and select Run as administrator).
40
68
2. Type:
41
-
```PowerShell
42
-
Install-Module AzureAD
43
-
```
69
+
```PowerShell
70
+
Install-Module AzureAD
71
+
```
72
+
73
+
or if you cannot be administrator on your machine, run:
74
+
```PowerShell
75
+
Install-Module AzureAD -Scope CurrentUser
76
+
```
77
+
78
+
### Run the script and start running
79
+
44
80
5. Go to the `AppCreationScripts` sub-folder. From the folder where you cloned the repo,
45
81
```PowerShell
46
82
cd AppCreationScripts
@@ -56,9 +92,9 @@ You're done. this just works!
56
92
We advise four ways of running the script:
57
93
58
94
- Interactive: you will be prompted for credentials, and the scripts decide in which tenant to create the objects,
59
-
- non-interactive: you will provide crendentials, and the scripts decide in which tenant to create the objects,
60
-
- Interactive in specific tenant: you will be prompted for credentials, and the scripts decide in which tenant to create the objects,
61
-
- non-interactive in specific tenant: you will provide crendentials, and the scripts decide in which tenant to create the objects.
95
+
- non-interactive: you will provide credentials, and the scripts decide in which tenant to create the objects,
96
+
- Interactive in specific tenant: you will provide the tenant in which you want to create the objects and then you will be prompted for credentials, and the scripts will create the objects,
97
+
- non-interactive in specific tenant: you will provide tenant in which you want to create the objects and credentials, and the scripts will create the objects.
0 commit comments