-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add SharePoint credentials (#11570)
- Loading branch information
1 parent
bc0d51e
commit 05c6109
Showing
4 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
packages/nodes-base/credentials/MicrosoftSharePointOAuth2Api.credentials.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import type { Icon, ICredentialType, INodeProperties } from 'n8n-workflow'; | ||
|
||
export class MicrosoftSharePointOAuth2Api implements ICredentialType { | ||
name = 'microsoftSharePointOAuth2Api'; | ||
|
||
extends = ['microsoftOAuth2Api']; | ||
|
||
icon: Icon = { | ||
light: 'file:icons/SharePoint.svg', | ||
dark: 'file:icons/SharePoint.svg', | ||
}; | ||
|
||
displayName = 'Microsoft SharePoint OAuth2 API'; | ||
|
||
documentationUrl = 'microsoft'; | ||
|
||
httpRequestNode = { | ||
name: 'Microsoft SharePoint', | ||
docsUrl: 'https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph', | ||
apiBaseUrlPlaceholder: 'https://{subdomain}.sharepoint.com/_api/v2.0/', | ||
}; | ||
|
||
properties: INodeProperties[] = [ | ||
{ | ||
displayName: 'Scope', | ||
name: 'scope', | ||
type: 'hidden', | ||
default: '=openid offline_access https://{{$self.subdomain}}.sharepoint.com/.default', | ||
}, | ||
{ | ||
displayName: 'Subdomain', | ||
name: 'subdomain', | ||
type: 'string', | ||
default: '', | ||
hint: 'You can extract the subdomain from the URL. For example, in the URL "https://tenant123.sharepoint.com", the subdomain is "tenant123".', | ||
}, | ||
]; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters