Tag: AllyAI – Sharepoint Connector – Authentication


  • AllyAI – Sharepoint Connector – Authentication

    Ally AI – Sharepoint Connectors – Authentication Problem #1 : How Do I Authenticate With Sharepoint ? def load_credentials(self, credentials: dict[str, Any]) -> dict[str, Any] | None: self._credential_json = credentials auth_method = credentials.get( "authentication_method", SharepointAuthMethod.CLIENT_SECRET.value ) sp_client_id = credentials.get("sp_client_id") sp_client_secret = credentials.get("sp_client_secret") sp_directory_id = credentials.get("sp_directory_id") sp_private_key = credentials.get("sp_private_key") sp_certificate_password = credentials.get("sp_certificate_password") if not sp_client_id: raise ConnectorValidationError("Client ID is required") if not sp_directory_id: raise ConnectorValidationError("Directory (tenant) ID is required") authority_url = f"{self.authority_host}/{sp_directory_id}" if auth_method == SharepointAuthMethod.CERTIFICATE.value: logger.info("Using certificate authentication") if not sp_private_key or not sp_certificate_password: raise ConnectorValidationError( "Private key and certificate password are required for certificate authentication" ) pfx_data = base64.b64decode(sp_private_key)

    Read More