Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microsfot sync failed #10381

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

microsfot sync failed #10381

wants to merge 3 commits into from

Conversation

guillim
Copy link
Contributor

@guillim guillim commented Feb 21, 2025

This PR is supposed to solve an issue with the syncrhonisation of messages, specifically with microsoft driver. Microsoft calls don't need access_Token so refreshing toekns was not implemented.

However, microsoft rely on its client which calls its refresfh_token, and I might have missed some underlying dependency from microsoft impelemtation so I setup the access token process to refresh it

Needs a talk before to be merged

@guillim guillim self-assigned this Feb 21, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR implements Microsoft OAuth token refresh functionality, extending the existing authentication system to support Microsoft connected accounts alongside Google integration.

  • Added new MicrosoftAPIRefreshAccessTokenService in /packages/twenty-server/src/modules/connected-account/refresh-access-token-manager/drivers/microsoft/services/microsoft-api-refresh-access-token.service.ts to handle Microsoft-specific token refresh logic
  • Integrated Microsoft token refresh into /packages/twenty-server/src/modules/messaging/message-import-manager/jobs/messaging-message-list-fetch.job.ts with proper error handling and telemetry
  • Missing error handling and type safety for Microsoft API response data in microsoft-api-refresh-access-token.service.ts
  • Consider adding retry logic for token refresh operations to handle temporary failures

5 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile

@charlesBochet
Copy link
Member

Ok, I can take over this one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants