Power Virtual Agents extensions for Dynamics 365 (workaround on installation hiccups)
Published: 2023-01-21 12:22:10

---
title: Power Virtual Agents extensions for Dynamics 365 (workaround on installation hiccups)
published: true
series: 101 - Dynamics 365 automation with bots/voice bots
date: 2023-01-21 12:01:28 UTC
tags: 
canonical_url: https://the.cognitiveservices.ninja/power-virtual-agents-extensions-for-dynamics-365-workaround-on-installation-hiccups
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t912e9ty6a8pk464ty1k.jpg
---
Photo by <a href="https://unsplash.com/@goshua13?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Joshua Aragon</a> on <a href="https://unsplash.com/s/visual/39532729-090c-457b-8152-830ae9027b3f?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
  
## Situation

You want to use Power Virtual Agent with Dynamics 365 Customer Service, and you are trying to install the extensions to activate [variables and actions](https://learn.microsoft.com/en-us/power-virtual-agents/configuration-hand-off-omnichannel#voice-based-capabilities).

![Figure 1: Message to documentation for installing the extensions](https://cdn.hashnode.com/res/hashnode/image/upload/v1674288550417/236e88ce-a85a-4ac0-8215-f67758feb1ea.png)
<figcaption>Figure 1: Message to documentation for installing the extensions.</figcaption>

You are following precisely the path described in the documentation, but you get an error message saying the solution is not compatible with your environment.  
In my case, all language settings are on en-US, but my tenant has a location in Germany.

![Figure 2: Error Message](https://cdn.hashnode.com/res/hashnode/image/upload/v1674289344735/88fe6d1e-e2a4-4d41-a4bc-314bd57a5cb8.png)
<figcaption>Figure 2: Error Message</figcaption>

## Motivation

This article is to overcome the situation for those running into the error.  
It is a "works-on-my-machine" solution and should help those who can fix it to find the root cause of it.

## Workaround

Here comes a dirty workaround to get it done in between.

Open the developer tools in your browser (Edge: CTRL+SHIFT+I) and open the Network Tab. While clicking on "install", you will see an error "400"

![Figure 3: error 400 while installing](https://cdn.hashnode.com/res/hashnode/image/upload/v1674289721304/415b6086-2fa3-489d-a191-b8d42d18cbcd.png)
<figcaption>Figure 3: error "400" while installing.</figcaption>

- right-click on the line with the error and

- select "Edit and Resend"

- Search for the Body of the "POST" Request.

![Figure 4: Body of "POST" Request](https://cdn.hashnode.com/res/hashnode/image/upload/v1674289996057/7d093278-17d7-40c3-ab0e-6ae48e040cbe.png)
<figcaption>Figure 4: Body of "POST" Request</figcaption>

- copy the body to an editor and

- find the "countryCode"; mine was set to DE,

![Figure 5: countyCode](https://cdn.hashnode.com/res/hashnode/image/upload/v1674290228211/7934ea16-8d6f-4fd6-8b5c-312740a9efe1.png)
<figcaption>Figure 5: countryCode</figcaption>

- exchange the countryCode to "US"

```
"countryCode" : "US"

```

- copy it back to developer tools and

- Click on the send button.

You will then recognize a result code "200" in the status line.

If you close the installation popup and go straight to the environment you want to install the extensions to, you will see that this "fix" was successful.

![Figure 6: Successful installing the extensions.](https://cdn.hashnode.com/res/hashnode/image/upload/v1674290719246/50d6d42f-310c-478b-9975-d1c2a4278e53.png)
<figcaption>Figure 6: Successfully installing the extensions.</figcaption>

![Figure 7: installed variables](https://cdn.hashnode.com/res/hashnode/image/upload/v1674290884128/d3918511-24d9-420d-83bb-daf4db8d78e3.png)
<figcaption>Figure 7: installed variables.</figcaption>

![Figure 8: Installed actions.](https://cdn.hashnode.com/res/hashnode/image/upload/v1674290957715/aa62e88f-978c-4541-90b9-9cb71908218c.png)
<figcaption>Figure 8: Installed actions.</figcaption>

## Conclusion

Do not give up when something unexpected happens. Find the root cause with the tools you have and give a first thought a try.