it sounds very trivial but it actually isn't: For a Visual Studio Workflow on a list item I need the current hostname. I've got the relative List URL (like "/sites/SiteCollectionName/Lists/Listname", I've got the web URL (like "https://host.name.tld/sites/SiteCollection/") but I actually just need the host... Since a lot of functionality like the URI class or string functions like regular expressions are not available in SharePoiunt workflows it's not as easy as I thought. Is there a way to get the hostname directly from SharePoint via REST somehow?



As far as I know it's only possible to get the web URL not just the host name but once you have that you could just trim the URL using Regex to get only the host name.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.