web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / add guest member to an...
Power Automate
Unanswered

add guest member to an Office 365 Group

(0) ShareShare
ReportReport
Posted on by 261

My goal is to add an external email address as a Guest member to an Office 365 Group. I need help transforming the email address string to the form user_domain#tenant.onmicrosoft.com.

Say for example that my guest's email address is john@msn.com

I have confirmed that the Add member to group block allows to add john_msn.com#EXT#contoso.onmicrosoft.com to an Office 365 Group in the Contoso tenant, as follows:

mobilismexico_0-1628876566795.png

So far I have been able to assign john to a string variable with these blocks:

mobilismexico_1-1628876813707.png

I know that I can obtain the domain string by simply extracting a substring starting from character @ for a length of total length minus "@position". This is where I'm stuck. From there I would only need to append my substrings in the right order:

user_domain#EXT#tenantconstant.onmicrosoft.com

 

What expressions should I use inside what blocks to accomplish this?

 

Thank you in advance!

Categories:
I have the same question (0)
  • Mitanshu Profile Picture
    1,650 Moderator on at

    You can use replace function/expression to change @ symbol in original email to _

    so john@msn.com will become john_msn.com.

    From here concatenate the rest of your static string using the Concat function/expression.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up

     

     

  • mobilismexico Profile Picture
    261 on at

    hi @happyume ,

    how exactly do I type the expression? I'm new to this. I tried this....

    replace(mystringvariable, '@','-')

    ... and us.flow.microsoft.com said The expression is invalid.

    What article would be a good starting point to learn how to use the expressions?

     

  • Verified answer
    Mitanshu Profile Picture
    1,650 Moderator on at

    replace(variables('original email'),'@','_')

     

    concat(outputs('Compose'),'#EXT#contoso.onmicrosoft.com')

     

     

    happyume_0-1628878549014.png

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up

  • Mitanshu Profile Picture
    1,650 Moderator on at

    The most likely reason you got error is because Power Automate did not save your entire syntax. Try putting your cursor at the end of your expression and click update/save.

     

    You can learn more from: https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

     

    happyume_1-1628878774400.png

     

     

    If the content of this reply was useful, then please consider giving it Thumbs Up

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard