How to properly construct ARM Action URL and set parameters?

Vince Asta 0 Reputation points
2023-07-11T17:59:53.8366667+00:00

Hello,

I am trying to create a workbook which force a user log off after choosing the user from a drop down. The queries properly return the sessionHostName and sessionHostSessionId. What I am then wanting to do is be able to execute an ARM Action based on these parameters which will force Log Off the user.

My ARM Action set-up is attached:
ARM1

The problem (I suspect) is that the URL is getting malformed. Instead of the URL looking like this:
https://management.azure.com/subscriptions/xxx-xxxx-xxx-xxx-xxx/resourceGroups/rg-xxx-xxx-xxx-xxxx/providers/Microsoft.DesktopVirtualization/hostPools/hp-xxx-xxxx-xxxx/sessionHosts/vm26.bliggety.blah.com/userSessions/23?api-version=2022-02-10-preview

The sessionHostName and sessionHostSessionId is being appended to the end of the URL (when viewing the request details):
https://management.azure.com/subscriptions/xxxx-xxxx-xxxx-xxxx-xxxx/resourceGroups/rg-xxx-xxx-xxx/providers/Microsoft.DesktopVirtualization/hostPools/hp-xxx-xxx-xxx-xxx/sessionHosts/%60%3Cunset%3E%60/userSessions/%60%3Cunset%3E%60?api-version=2022-02-10-preview&force=%60%3Cunset%3E%60&%7BsessionHostName%7D=vm26.bliggety.blah.com&%7BuserSessionId%7D=23

Instead of my parameters dropping in where needed, the text "%60%3Cunset%3E%60" is getting dropped in.

If anyone has any insight as to what I'm doing wrong, I would appreciate any assistance. Thanks!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,066 questions
Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,675 questions
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 26,436 Reputation points
    2023-07-18T08:25:46.47+00:00

    Hello Vince Asta

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.

    Based on the information shared, in this specific case, "%60%3Cunset%3E%60 is an encoded string for <unset>. It is used to indicate that the value for the session host name and user session ID is not set.

    I would request you to share the documentation that you are following to assist you better on this.

    If this workbook is created from Azure Monitor, then I would tag the case accordingly so that SME's from that service can add more insight and help on this.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.