Skip to content

Commit c3fa6ec

Browse files
updated tenant id/name documentation and flask run instructions
1 parent f754f74 commit c3fa6ec

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

PersonalAccessTokenAPIAppSample/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ In the steps below, "ClientID" is the same as "Application ID" or "AppId".
120120
> Note: if you used the setup scripts, the changes below may have been applied for you
121121
122122
1. Open the `app_config.py` file
123-
1. Find the app key `Enter_the_Tenant_Name_Here` and replace the existing value with your Azure AD tenant name.
124-
1. You saved your application secret during the creation of the `python-webapp` app in the Azure portal.
123+
2. For a multi-tenant app, find the app key `Enter_the_Tenant_ID_Here` and replace the existing value with your Azure AD tenant ID. For a single tenant app, use the alternate value for the AUTHORITY variable, adding the specific tenant name in `Enter_the_Tenant_Name_Here`.
124+
3. You saved your application secret during the creation of the `python-webapp` app in the Azure portal.
125125
Now you can set the secret in environment variable `CLIENT_SECRET`,
126126
and then adjust `app_config.py` to pick it up.
127-
1. Find the app key `Enter_the_Application_Id_here` and replace the existing value with the application ID (clientId) of the `python-webapp` application copied from the Azure portal.
128-
1. Find the ENDPOINT variable and replace `Enter_the_Collection_Name_Here` with the name of your Azure DevOps collection.
127+
4. Find the app key `Enter_the_Application_Id_here` and replace the existing value with the application ID (clientId) of the `python-webapp` application copied from the Azure portal.
128+
5. Find the ENDPOINT variable and replace `Enter_the_Collection_Name_Here` with the name of your Azure DevOps collection.
129129

130130
### Step 4: Run the sample
131131

@@ -140,6 +140,12 @@ Run app.py from shell or command line. Note that the host and port values need t
140140
$ flask run --host localhost --port 5000
141141
```
142142

143+
or
144+
145+
```Shell
146+
$ python -m flask run
147+
```
148+
143149
## Community Help and Support
144150

145151
Use [Stack Overflow](http://stackoverflow.com/questions/tagged/msal) to get support from the community.

PersonalAccessTokenAPIAppSample/app_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# if not CLIENT_SECRET:
1515
# raise ValueError("Need to define CLIENT_SECRET environment variable")
1616

17-
AUTHORITY = "https://login.microsoftonline.com/Enter_the_Tenant_Name_Here" # For multi-tenant app
17+
AUTHORITY = "https://login.microsoftonline.com/Enter_the_Tenant_ID_Here" # For multi-tenant app
1818
# AUTHORITY = "https://login.microsoftonline.com/Enter_the_Tenant_Name_Here"
1919

2020
REDIRECT_PATH = "/getAToken" # Used for forming an absolute URL to your redirect URI.

0 commit comments

Comments
 (0)