cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FlowSenpai
Frequent Visitor

Passing a JSON value to an Azure Run Book

Hello,
I'm experimenting with flow to post a JSON input to an Azure Run Book that I want to get a mailbox for me.

I got the flow to work and pass on the information. The information I pass on looks like this:
{
"Values":
{
"request": "Get-mailbox",
"user": " test@test.com"
}
}

The Input reaches the Azure Run Book and I got the output to work, yet I can't find a way to bind the input to a variable and use it in a Get-Mailbox command.

my code for now looks like this:

Param (
[string] $Request,
)

Write-Output -InputObject "test", $Request

I get the output back into my flow and send it to my mail adres yet the Output is empty except for the "test" part.

Any help would be greatly appriciates
1 ACCEPTED SOLUTION

Accepted Solutions
FlowSenpai
Frequent Visitor

I managed to find the solution.
The way I passed on the JSON data was incorrect. Changing it to

{

"request": "Get-mailbox",

"user": " test@test.com"

}

Was the solution

View solution in original post

2 REPLIES 2
v-yuazh-msft
Community Support
Community Support

Hi @FlowSenpai,

 

Could you please share a screenshot of the configuration of your flow?

Could you please explain more details about your requirement so we would try to provide a proper workaround for you.

 

Best regards,

Alice

FlowSenpai
Frequent Visitor

I managed to find the solution.
The way I passed on the JSON data was incorrect. Changing it to

{

"request": "Get-mailbox",

"user": " test@test.com"

}

Was the solution

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,301)