【问题标题】:How to create outlook calendar event with custom value?如何创建具有自定义值的 Outlook 日历事件?
【发布时间】:2021-08-17 07:54:26
【问题描述】:

我想创建具有自定义值的 Outlook 日历事件。因为我需要在打开活动时获得一些价值。

这是否可以在 Outlook add in - 日历事件中创建事件时发送自定义值。

const msalConfig = {
  auth: {
    clientId: CLIENT_ID, // Client Id of the registered application
    redirectUri: REDIRECT_URL,
  },
};

const graphScopes = ["user.read", "mail.send", "openid", "profile"]; // An array of graph scopes
const msalApplication = new UserAgentApplication(msalConfig);
const options = new MSALAuthenticationProviderOptions(graphScopes);

const authProvider = new ImplicitMSALAuthenticationProvider(
  msalApplication,
  options
);
const option = {
  authProvider, // An instance created from previous step
};
const client = Client.initWithMiddleware(option);

示例事件:

  let event = {
      "subject": "Let's go for lunch",
      "body": {
        "contentType": "HTML",
        "content": "Does mid month work for you?"
      },
      "start": {
        "dateTime": "2021-08-13T12:00:00",
        "timeZone": "Pacific Standard Time"
      },
      "end": {
        "dateTime": "2021-08-13T14:00:00",
        "timeZone": "Pacific Standard Time"
      },
      "location":{
        "displayName":"Harry's Bar"
      },
      "attendees": [
        {
          "emailAddress": {
            "address":"adelev@contoso.onmicrosoft.com",
            "name": "Adele Vance"
          },
          "type": "required"
        }
      ]
    };
    client.api("/me/events").post(event, (err, res) => {
      this.setState({ isLoading: false });
    });

我想在创建事件时传递自定义值。这是否可以使用自定义值创建事件。

【问题讨论】:

    标签: outlook microsoft-graph-api outlook-web-addins outlook-calendar


    【解决方案1】:

    您可以使用Microsoft Graph API 从自定义数据创建日历事件。

    【讨论】:

      猜你喜欢
      • 2015-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-22
      • 1970-01-01
      • 1970-01-01
      • 2019-07-08
      相关资源
      最近更新 更多