projectParticipation の作成

名前空間: microsoft.graph

重要

Microsoft Graph のバージョンの /beta API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 API が v1.0 で使用できるかどうかを確認するには、 バージョン セレクターを使用します。

この API を使用して、ユーザーのプロファイルに新しい projectParticipation オブジェクトを作成 します

アクセス許可

この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。

アクセス許可の種類 アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校アカウント) User.ReadWrite, User.ReadWrite.All
委任 (個人用 Microsoft アカウント) User.ReadWrite, User.ReadWrite.All
アプリケーション User.ReadWrite.All

HTTP 要求

POST /me/profile/projects
POST /users/{id | userPrincipalName}/profile/projects

要求ヘッダー

名前 説明
Authorization ベアラー {token}。必須。
Content-Type application/json. Required.

要求本文

要求本文で 、projectParticipation オブジェクトの JSON 表記を指定します。

次の表に、ユーザーのプロファイルに新しい projectParticipation オブジェクトを作成するときに設定できるプロパティを示 します

プロパティ 説明
allowedAudiences 文字列 エンティティ内に含まれる値を表示できる対象ユーザー。 itemFacet から継承されます。 可能な値は、mefamilycontactsgroupMembersorganizationfederatedOrganizationseveryoneunknownFutureValue です。
categories String collection ユーザーがプロジェクトに関連付けられたカテゴリ (デジタル変換、オイル リグなど) を含む。
クライアント companyDetail プロジェクトが使用したクライアントに関する詳細情報が含まれる。
collaborationTags String collection ユーザーが関心に関連付けられたエクスペリエンス シナリオ タグを含む。 コレクションで使用できる値は、 askMeAbout 次のとおりです ableToMentorwantsToLearn wantsToImprove
同僚 relatedPerson コレクション プロジェクトで作業したユーザーの一覧を表示します。
詳細 positionDetail プロジェクトでのユーザーの役割に関する詳細が含まれる。
displayName String プロジェクトの表示名が含まれる。
推論 inferenceData エンティティが作成または変更アプリケーションによって推論される場合の推論の詳細を格納します。 itemFacet から継承されます
source personDataSource 別のサービスから同期された場合に値が発生した場所。 itemFacet から継承されます
スポンサー relatedPerson コレクション プロジェクトをスポンサーした人物またはユーザー。

リレーションシップ

応答

成功した場合、このメソッドは応答コードと、応答本文の新しい 201, Created projectParticipation オブジェクトを返します。

要求

要求の例を次に示します。

POST https://graph.microsoft.com/beta/me/profile/projects
Content-type: application/json

{
  "categories": [
    "Branding"
  ],
  "client": {
    "displayName": "Contoso Ltd.",
    "department": "Corporate Marketing",
    "webUrl": "https://www.contoso.com"
  },
  "displayName": "Contoso Re-branding Project",
  "detail": {
    "company": {
      "displayName": "Adventureworks Inc.",
      "department": "Consulting",
      "webUrl": "https://adventureworks.com"
    },
    "description": "Rebranding of Contoso Ltd.",
    "jobTitle": "Lead PM Rebranding",
    "role": "project management",
    "summary": "A 6 month project to help Contoso rebrand after they were divested from a parent organization."
  }
}

応答

応答の例を次に示します。

注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。

HTTP/1.1 201 Created
Content-type: application/json

{
  "id": "0fb4c1e3-c1e3-0fb4-e3c1-b40fe3c1b40f",
  "allowedAudiences": "organization",
  "inference": null,
  "createdDateTime": "2020-07-06T06:34:12.2294868Z",
  "createdBy": {
    "application": null,
    "device": null,
    "user": {
      "displayName": "Innocenty Popov",
      "id": "db789417-4ccb-41d1-a0a9-47b01a09ea49"
    }
  },
  "lastModifiedDateTime": "2020-07-06T06:34:12.2294868Z",
  "lastModifiedBy": {
    "application": null,
    "device": null,
    "user": {
      "displayName": "Innocenty Popov",
      "id": "db789417-4ccb-41d1-a0a9-47b01a09ea49"
    }
  },
  "source": null,
  "categories": [
    "Branding"
  ],
  "client": {
    "displayName": "Contoso Ltd.",
    "pronunciation": null,
    "department": "Corporate Marketing",
    "officeLocation": null,
    "address": null,
    "webUrl": "https://www.contoso.com"
  },
  "displayName": "Contoso Re-branding Project",
  "detail": {
    "company": {
      "displayName": "Adventureworks Inc.",
      "pronunciation": null,
      "department": "Consulting",
      "officeLocation": null,
      "address": null,
      "webUrl": "https://adventureworks.com"
    },
    "description": "Rebranding of Contoso Ltd.",
    "endMonthYear": "datetime-value",
    "jobTitle": "Lead PM Rebranding",
    "role": "project management",
    "startMonthYear": "datetime-value",
    "summary": "A 6 month project to help Contoso rebrand after they were divested from a parent organization."
  },
  "colleagues": null,
  "sponsors": null
}