2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2020-12-28 23:23:01 -08:00
|
|
|
|
|
|
|
export class MicrosoftOutlookOAuth2Api implements ICredentialType {
|
|
|
|
name = 'microsoftOutlookOAuth2Api';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-07-24 08:36:17 -07:00
|
|
|
extends = ['microsoftOAuth2Api'];
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-12-28 23:23:01 -08:00
|
|
|
displayName = 'Microsoft Outlook OAuth2 API';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-12-28 23:23:01 -08:00
|
|
|
documentationUrl = 'microsoft';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-12-28 23:23:01 -08:00
|
|
|
//https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent
|
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2022-07-24 08:36:17 -07:00
|
|
|
default:
|
|
|
|
'openid offline_access Mail.ReadWrite Mail.ReadWrite.Shared Mail.Send Mail.Send.Shared MailboxSettings.Read',
|
2021-01-10 15:09:58 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Use Shared Mailbox',
|
|
|
|
name: 'useShared',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'boolean',
|
2021-01-10 15:09:58 -08:00
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'User Principal Name',
|
|
|
|
name: 'userPrincipalName',
|
2022-07-24 08:36:17 -07:00
|
|
|
description: "Target user's UPN or ID",
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-01-10 15:09:58 -08:00
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-07-24 08:36:17 -07:00
|
|
|
useShared: [true],
|
2021-01-10 15:09:58 -08:00
|
|
|
},
|
|
|
|
},
|
2020-12-28 23:23:01 -08:00
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|