Adding cross tenant user to a shared channel by Microsoft Graph

Mohammad Jalalian 0 Reputation points
2023-07-14T20:27:55.48+00:00

Hi friends,

I want to add a user from a cross-tenant by Microsoft graph to a shared channel. I added the tenant from https://entra.microsoft.com/, External Identities, Cross-tenant Access setting. I used this documentation https://learn.microsoft.com/en-us/graph/api/channel-post-members?view=graph-rest-1.0&tabs=http, example 5, to make an API call for adding a user from cross-tenant org to a shared channel in my tenant. If I use the tenant Id from my org in the message body, I receive this error "Externally authenticated users and guest users are not allowed in shared channels". When I use cross-tenant org tenant Id, I receive this error "User is not allowed to be added due to xTap." CurrentInviteeForbidden. I am pretty sure I should use the tenant Id from the cross-tenant because when I called the service without any tenant Id, I received the error same as the call that I made with my org tenant Id.
Moreover, my code is working for other types of channels, but I need to work with shared channels. Additionally, I can add users manually from cross-tenant org to my shared channel.

Regards,

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,209 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mohammad Jalalian 0 Reputation points
    2023-08-15T16:16:07.2166667+00:00

    Hi,

    Do you have any expectations about when you can get me back?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.