1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Power AutomateでTeamsのチームメンバーの一覧を取得する

Last updated at Posted at 2024-11-15

概要

基本的にTeamsのグループメンバーを取得したい場合、[Office 365グループ]コネクタの[グループメンバーの一覧表示]アクションを使用します。
ただし、Teamsから所有者の追加をした場合、メンバーだけでなく所有者も取得結果に含まれてしまいます。詳細は以下記事をご確認ください。

今回は所有者を含まないTeamsのチームメンバーの一覧を取得する手順を紹介します。

手順1.[HTTP要求 V2を送信する]で所有者を含むメンバーの一覧を取得する

[Office 365グループ]コネクタの[HTTP要求 V2を送信する]アクションで、URIを設定して所有者を含むメンバーの一覧を取得します。

image.png

手順2.[HTTP要求 V2を送信する]で所有者の一覧を取得する

[Office 365グループ]コネクタの[HTTP要求 V2を送信する]アクションで、URIを設定して所有者の一覧を取得します。

image.png

手順3.[アレイのフィルター]で差集合を用いてメンバーの一覧を取得する

[データ操作]コネクタの[アレイのフィルター処理]で、手順1と2で取得した配列の差集合を求めます。左辺には、以下の数式をセットします。

contains(outputs('HTTP_要求_V2_を送信する_-_所有者の一覧を取得')?['body/value'], item())

image.png

Power Automateで配列の差集合を求める方法については、以下記事をご確認ください。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?