diff --git a/.env-template b/.env-template index b733bdf9..30158b77 100644 --- a/.env-template +++ b/.env-template @@ -14,9 +14,6 @@ MICROSOFT_CLIENT_ID=your-azure-ad-client-id MICROSOFT_CLIENT_SECRET=your-azure-ad-client-secret #Azure AD Tenant ID (or 'common' for multi-tenant) MICROSOFT_TENANT_ID=your-azure-ad-tenant-id -#Your project's redirect URI that you registered in Azure Portal. -#For example: http://localhost:5000/redirect -MICROSOFT_REDIRECT_URI=http://localhost:7091/api/connectors/callback/ms_entra_id #If you are using a Microsoft Entra ID tenant, #configure the AUTHORITY variable as #"https://login.microsoftonline.com/TENANT_GUID" diff --git a/application/core/settings.py b/application/core/settings.py index 03ea2468..490717fc 100644 --- a/application/core/settings.py +++ b/application/core/settings.py @@ -55,7 +55,6 @@ class Settings(BaseSettings): MICROSOFT_CLIENT_ID: Optional[str] = None # Azure AD Application (client) ID MICROSOFT_CLIENT_SECRET: Optional[str] = None # Azure AD Application client secret MICROSOFT_TENANT_ID: Optional[str] = "common" # Azure AD Tenant ID (or 'common' for multi-tenant) - MICROSOFT_REDIRECT_URI: Optional[str] = "http://localhost:7091/api/connectors/callback" # Your project's redirect URI that you registered in Azure Portal. MICROSOFT_AUTHORITY: Optional[str] = None # e.g., "https://login.microsoftonline.com/{tenant_id}" # GitHub source GITHUB_ACCESS_TOKEN: Optional[str] = None # PAT token with read repo access diff --git a/application/parser/connectors/share_point/auth.py b/application/parser/connectors/share_point/auth.py index 504732cc..85120666 100644 --- a/application/parser/connectors/share_point/auth.py +++ b/application/parser/connectors/share_point/auth.py @@ -31,7 +31,7 @@ class SharePointAuth(BaseConnectorAuth): "Microsoft OAuth credentials not configured. Please set MICROSOFT_CLIENT_ID and MICROSOFT_CLIENT_SECRET in settings." ) - self.redirect_uri = settings.MICROSOFT_REDIRECT_URI + self.redirect_uri = settings.CONNECTOR_REDIRECT_BASE_URI self.tenant_id = settings.MICROSOFT_TENANT_ID self.authority = getattr(settings, "MICROSOFT_AUTHORITY", f"https://{self.tenant_id}.ciamlogin.com/{self.tenant_id}")