Power Automate – resolving error – Could not retrieve values. The dynamic invocation request failed with error. Invalid hostname for this tenancy

Hi All,
Greetings for the day!!!
Today new issue and solution 🙂 Small learning!
Background / Use case / Details :
- We need to get the excel file worksheet in one of our Power Automate
- We are using “Get worksheets” action from “Excel online (Business)” connection
- For demo purpose I have created “Instant cloud flow” so that can trigger manually and test
- Next, added “Get worksheets” action
- “Get worksheets” action requires to select “Location” and then respective “Document Library”
- Here “Location” can be site and we are specifying site URL – https://knowledgejunction1.sharepoint.com/sites/Demo/Space%20In%20URL
- As we are specifying URL it should resolve the URL automatically and load the respective document libraries from the site but an error is getting as
Issue / Error :
Could not retrieve values. The dynamic invocation request failed with error: {
“error”: {
“code”: “invalidRequest”,
“message”: “Invalid hostname for this tenancy”,
“innerError”: {
“date”: “2023-03-28T10:12:28”,
“request-id”: “4567a025-c002-4347-a185-494ee44c623c”,
“client-request-id”: “4567a025-c002-4347-a185-494ee44c623c”
}
}
}
Solution / Cause
- Here, reason for the error is – location / site url – we are specifying
- Encoding / special characters available in site URL – %20
- As we remove these special character and specify the location / site url again document libraries loaded successfully 🙂
https://knowledgejunction1.sharepoint.com/sites/Demo/Space In URL

Thanks for reading!!! HAVE A FANTASTIC TIME AHEAD 🙂
You must log in to post a comment.