diff --git a/.env.sample b/.env.sample index 6d2affa..f447a75 100644 --- a/.env.sample +++ b/.env.sample @@ -1,5 +1,6 @@ FLASK_DEBUG=True -# Expects a full tenant name such as "contoso.onmicrosoft.com", or its GUID -TENANT_ID= +# Expects a full tenant id such as "contoso.onmicrosoft.com", or its GUID +# Or leave it undefined if you are building a multi-tenant app +#TENANT_ID= CLIENT_ID= CLIENT_SECRET= diff --git a/app_config.py b/app_config.py index 2ba53ff..2c96709 100644 --- a/app_config.py +++ b/app_config.py @@ -6,7 +6,7 @@ CLIENT_SECRET = os.getenv("CLIENT_SECRET") # AUTHORITY = "https://login.microsoftonline.com/common" # For multi-tenant app -AUTHORITY = f"https://login.microsoftonline.com/{os.getenv('TENANT_ID')}" +AUTHORITY = f"https://login.microsoftonline.com/{os.getenv('TENANT_ID', 'common')}" REDIRECT_PATH = "/getAToken" # Used for forming an absolute URL to your redirect URI. # The absolute URL must match the redirect URI you set