-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
✨ Source Microsoft Sharepoint: Make refresh token optional #37372
✨ Source Microsoft Sharepoint: Make refresh token optional #37372
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -21,6 +21,13 @@ class Config: | |||
|
|||
# Fields for the OAuth authentication, including tenant_id, client_id, client_secret, and refresh_token | |||
auth_type: Literal["Client"] = Field("Client", const=True) | |||
grant_type: str = Field( | |||
title="OAuth Type", | |||
description="Specifies the location(s) to search for files. Valid options are 'ACCESSIBLE_DRIVES' for all SharePoint drives the user can access, 'SHARED_ITEMS' for shared items the user has access to, and 'ALL' to search both.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update description and
add more details to docs about authentication options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -27,7 +27,7 @@ This page contains the setup guide and reference information for the Microsoft S | |||
5. Enter **Drive Name**. To find your drive name go to settings and at the top of setting menu you can find the name of your drive. | |||
6. Select **Search Scope**. Specifies the location(s) to search for files. Valid options are 'ACCESSIBLE_DRIVES' for all SharePoint drives the user can access, 'SHARED_ITEMS' for shared items the user has access to, and 'ALL' to search both. Default value is 'ALL'. | |||
7. Enter **Folder Path**. Leave empty to search all folders of the drives. This does not apply to shared items. | |||
8. The **OAuth2.0** authorization method is selected by default. Click **Authenticate your Microsoft SharePoint account**. Log in and authorize your Microsoft account. | |||
8. The **OAuth2.0** authorization is selected by default for authentication. You have the option to choose the `grant_type`: `authorization_code`, which uses a refresh token to maintain access without frequent re-authorizations, or `client_credentials`, which does not require a refresh token. After selecting the desired grant type, click **Authenticate your Microsoft SharePoint account**, log in, and authorize your Microsoft account to connect it with Airbyte. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it tested manually?
I think we hide all logic in the UI by one button and all data inputs from DB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I tested it locally.
client_credentials
for OAuth2 flowThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please add unit tests for these changes
What
This update introduces the optionality of the
refresh_token
parameter in our OAuth flow configurations. This change allows the implementation of OAuth flows without requiring a refresh token, addressing the needs outlined in #35588.How
The modification enables the connector to recognize and appropriately handle cases where the
refresh_token
is omitted from the OAuth configuration. This facilitates more versatile authentication strategies by supporting differentgrant_type
selections based on the presence or absence of therefresh_token
.