cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mobilismexico
Helper I
Helper I

add guest member to an Office 365 Group

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!

1 ACCEPTED SOLUTION

Accepted Solutions
happyume
Solution Sage
Solution Sage

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

View solution in original post

4 REPLIES 4
happyume
Solution Sage
Solution Sage

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

 

 

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?

 

happyume
Solution Sage
Solution Sage

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

View solution in original post

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,211)