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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Created By Email from ...
Power Automate
Answered

Created By Email from Sharepoint list not usable to create Team

(0) ShareShare
ReportReport
Posted on by 19

Hi all,

 

I have a Sharepoint list and connected this to Power Automate. One of the steps from this flow is to create a new team (for Teams) and add the user who creates a new item in the Sharepoint list as owner of this new team.  Normally one would use the "Created By Email" to achieve this (as in the screenshot below):

 

Screenshot_1.png

 

This is however not working for our environment because our users are having different primary SMTP email domains which are different then the email logon in Microsoft 365. The flow returns a "unknown user" error. The flow only works if the primary email is the same as the logon email from Microsoft 365.

 

I hope someone allready fixed this issue.

 

Many thanks in advance!

Categories:
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @PowerAutomate4,

     

    Have you tried the Created by Claims field of the user. That might contain the correct e-mail. I would also use a Get user action to retrieve the AAD ID from Azure Active Directory btw.

     

    Below is an example.

     

    1. Get AD User. Use a split function to only retrieve the e-mail from the claim value.

     

    split(outputs('Get_item')?['body/Author/Claims'], 'membership|')[1]

    splitclaims.png

     

    2. Use Id in the Add a member to team action

     useidinaddteamsmember.png

  • PowerAutomate4 Profile Picture
    19 on at

    Thanks for the fast reply! I tried the "Created by Claims" field already but that doesn't work.

    The output is 'i:0#.f|membership|user@domain.tld'

    Where user@domain.tld is also not the primary SMTP address. So this email is not good to use in the AAD ID field also.

     

    But I like your solution to get the AAD ID from the "Get user"  function. But i don't see this "Get user" function?

    Is this possible?

  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @PowerAutomate4,

     

    Should be part of the Azure AD connector. First look for Azure AD. Select it and look for Get User.

    https://docs.microsoft.com/en-us/connectors/azuread/#get-user

     

    Btw, that action requires User Id (which we don't know yet) or the User Principal Name. So, if you know the UPN of your Created By User you could use the Get User to retrieve the correct User Id.

     

    azuread_getuser.png

  • PowerAutomate4 Profile Picture
    19 on at

    Hi! 

    I found the function. Thanks!

    I did see that the "Created by Claims" email field is good after all. I mistaked here. So this field is usable.

     

    I will give it try and let you know.

     

    Thanks! Appreciate your help!

  • PowerAutomate4 Profile Picture
    19 on at

    I have tested your solutions with the "Get User" function but I receive this error:

     

    PowerAutomate4_0-1636723926910.png

    "message": "Bad Request - Error in query syntax."

     

    I used the 'Created By Claims'" instead of the 'Get_item'

    I also get the syntax error when I use your original code.

  • Verified answer
    Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @PowerAutomate4,

     

    You only have to amend the expression when your action which is retrieving the e-mail has a different name. That Get Item after outputs refers to the name of the action not the field. The outputs function its format is outputs('Name of action').

     

    Author/Claims is the internal name of the Created by Claims field which is part of the body. So, it shouldn't be necessary to amend the part after the '?'.

     

    From the screenshot it also looks like you directly pasted the code in the value field. Can you paste that code into the expression editor instead? 

     

    If you are using the newer expression editor interface it will look like below

     

    expressioneditor_copypasting_newinterface.png

     

    When you are using the older expression interface you will probably see something like below.

     

    expressioneditor_copypasting.png

     

  • PowerAutomate4 Profile Picture
    19 on at

    My bad...it works fine. I also found this solution to get the email from the "Created by Claims"

     

    last(split(triggerOutputs()?['body/Author/Claims'],'|'))

     

    Thanks again. Have a nice weekend!

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard