Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 8u4Hvs8+VwO2N8MErriscE
Power Apps - Building Power Apps
Answered

When creating email one of CC: recipients gets error - 400 One or more of the recipients are invalid.\r\nclientRequestId:

Like (0) ShareShare
ReportReport
Posted on 20 Oct 2023 11:19:32 by 4

Hi Community!

I received legacy app which send emails via power bi and Office365Outlook connector (it wasn't updated for 2 years).
I'm not good at power apps so need help to resolve recent issue - app started getting errors. I've update component Office365Outlook.SendEmail to Office365Outlook.SendEmailV2 but still receive error:
 Office365Outlook.SendEmailv2 failed {"status": 400, "message": One or more of the recipients are invalid.\r\nclientRequestId:

The app is simple - it sends email and if reciver is sames as role it send email to receiver and 3 "test" emails and if not it adds 4 email in CC. I think problem is with part where it checks whether reciver is same as role.

Can you help me with this error?

 

 

 

 

 

Navigate(ScrMain;ScreenTransition.Fade) 
And 
 Office365Outlook.SendEmailV2(
 First([@PowerBIIntegration].Data).PowerAppRelationshipTypeCheckEmailReceiverEmail;
 "Current relationship with " & First([@PowerBIIntegration].Data).Account;
 "<p>Hi " & First([@PowerBIIntegration].Data).PowerAppRelationshipTypeCheckEmailReceiverFirstName& ",</p>" &
 "<p>some text.</p> 
 <p>some text <a href="& First([@PowerBIIntegration].Data).AccountURL&">" & First([@PowerBIIntegration].Data).Account &"</a>.<br>" &
 "some text " & First([@PowerBIIntegration].Data).LastRevenueDateYearMonth & " some text.</p>" & 
 "<p>some text " & First([@PowerBIIntegration].Data).Account & " some text<br>
 some text</p> 

 <p>Regards,<br>" &
 User().FullName & " | " & User().Email & " | title | </p>";
{IsHtml: true
;Cc:
If(
 First([@PowerBIIntegration].Data).RoleName = First([@PowerBIIntegration].Data).PowerAppRelationshipTypeCheckEmailReceiver
 ;Blank()
 ;First([@PowerBIIntegration].Data).RoleEmail
)
&If(
 User().Email = "test@mail.com";"test2@mail.com";"testgenericSupport@mail.com"
 )
;Importance:"Normal"})

 

 

 

 

Bohdan_0-1697800931422.png

 

 

 

 

  • Verified answer
    cdwhite Profile Picture
    1,067 Most Valuable Professional on 20 Oct 2023 at 12:26:21
    Re: When creating email one of CC: recipients gets error - 400 One or more of the recipients are invalid.\r\nclientRequestId:

    Hi @Bohdan ,

    I'd suggest a nice word to the person or team who owns the data in the dwh users table (guessing this is SQL given the 'dwh' reference?). Does the table have a flag for users no longer active and can those be removed from the Power BI outputs with which you are interacting with? Or, it may be that the user in the dwh table is valid but the email address in that table needs updating.

    Either way, as it's pointing towards an issue with the underlying data, I'd recommend trying to rectify that source. There could be other processes/automations impacted if the raw data isn't accurate 😀
    ------------------------------------------------------------------------------------------------------------------------------
    If I've answered your question, please mark your post as Solved. You can accept more than one post as a solution.

    If my response was a good one, please give it a Thumbs Up!

    Visit my blog: https://platformsofpower.net

  • Bohdan Profile Picture
    4 on 20 Oct 2023 at 12:05:55
    Re: When creating email one of CC: recipients gets error - 400 One or more of the recipients are invalid.\r\nclientRequestId:

    Hi @cdwhite 

    Looks like emaill address (_scrubbedSensitiveData_@domain.com) is not valid anymore.
    Is there any other way to do this but without mentioned above? All emails are getting from dwh users table in the model and compared with GAL in outlook.

  • ANB Profile Picture
    7,081 Super User 2025 Season 1 on 20 Oct 2023 at 11:37:10
    Re: When creating email one of CC: recipients gets error - 400 One or more of the recipients are invalid.\r\nclientRequestId:

    Hi @Bohdan , Please check that the recipient is active in Azure AD (Microsoft Entra ID). I mean whoever is added in CC, that user should be Active user in Azure AD (Microsoft Entra ID).  

    ANB_0-1697801693837.png

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.👍

    Thanks,
    ANB


  • cdwhite Profile Picture
    1,067 Most Valuable Professional on 20 Oct 2023 at 11:34:40
    Re: When creating email one of CC: recipients gets error - 400 One or more of the recipients are invalid.\r\nclientRequestId:

    Hi @Bohdan ,

    Is the email address shown in the error (_scrubbedSensitiveData_@domain.com) still active in the Global Address Book (GAL) and/or Active Directory for your company?

    If it's pulling that value from the Power BI integrated data, what's the underlying source of that data and where does it get its email addresses from?

    Your formula's seem ok, I suspect it's an issue with the data but I could be wrong.
    ------------------------------------------------------------------------------------------------------------------------------
    If I've answered your question, please mark your post as Solved. You can accept more than one post as a solution.

    If my response was a good one, please give it a Thumbs Up!

    Visit my blog: https://platformsofpower.net

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started