Skip to content

Commit 27d6dfd

Browse files
authored
Merge pull request #96 from Azure-Samples/default-to-common
Make TENANT_ID optional
2 parents 4850dbd + 3bf15da commit 27d6dfd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.env.sample

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FLASK_DEBUG=True
2-
# Expects a full tenant name such as "contoso.onmicrosoft.com", or its GUID
3-
TENANT_ID=<tenant id>
2+
# Expects a full tenant id such as "contoso.onmicrosoft.com", or its GUID
3+
# Or leave it undefined if you are building a multi-tenant app
4+
#TENANT_ID=<tenant id>
45
CLIENT_ID=<client id>
56
CLIENT_SECRET=<client secret>

app_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
CLIENT_SECRET = os.getenv("CLIENT_SECRET")
77

88
# AUTHORITY = "https://login.microsoftonline.com/common" # For multi-tenant app
9-
AUTHORITY = f"https://login.microsoftonline.com/{os.getenv('TENANT_ID')}"
9+
AUTHORITY = f"https://login.microsoftonline.com/{os.getenv('TENANT_ID', 'common')}"
1010

1111
REDIRECT_PATH = "/getAToken" # Used for forming an absolute URL to your redirect URI.
1212
# The absolute URL must match the redirect URI you set

0 commit comments

Comments
 (0)