Forum Discussion
André Pinheiro
Microsoft
Jun 08, 2022Shared Channel: Adding external members - Automation
Hi all,
I have 2 customer questions about automation processes for shared channels:
- Is there any automatized way to add a new external member to a shared channel? PS, PowerAutomate or other? If not, is there anything on the roadmap?
- How can we automatically send a message to a new member added to a shared channel? Is PowerAutomate an option?
Thanks in advance đŸ™‚
2 Replies
- With the appropriate B2B direct connect setup through XTAP on both sides you can add external users to shared channels using Graph or PowerShell, but in my testing I have discovered that you need the objectID of the external user, UPN is not yet supported, so it’s not a good solution unless you manage or have the appropriate access to both the host and external tenant.
As for your second question you should be able to use audit logs or similar to identify newly added members and send them a message using power automate or other automation.- kfriesenCopper Contributor
Magnus Sandtorv
You can now do this using beta api:
https://learn.microsoft.com/en-us/graph/api/channel-post-members?view=graph-rest-beta&tabs=powershell
See example 6 in link above, and then click the "powershell" button to get the code.