Microsoft Places - Errors while running commands

I’m trying to run commands in PowerShell 7 (running as administrator) and connected to exchangeonline and then microsoftplaces. I’m using this page for reference on steps to add a building to microsoft places: Configure buildings and floors - Microsoft Places | Microsoft Learn

I get errors no matter which command I try. One of the first commands is to Initialize-Places. I pick the option to export suggested mapping and it throws an error that starts with…

“Initialize-Places: Status(StatusCode=“Unavailable”, Detail=“Error starting gRPC call. HttpRequestException: The SSL connection could not be established, see inner exception. IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. SocketException: An existing connection was forcibly closed by the remote host.”, DebugException="System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
—> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
—> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.”

If I try to simply add a place with the command: new-place -Name “BuildingName” I get a similar error.

Googling the errors mentioned I need to be sure TLS 1.2 is enabled…it is. Says I need to run PS 7 as Administrator…I am. Says I need Dot Net 6.x or higher…I have Dot Net 8 installed.

Just wondering what the trick is to be able to add buildings to the microsoft places so that users will see them in the Location drop down in Outlook Work Hours/Location screen.

Any tips would be appreciated.

Thanks!

Hi, welcome to the forum :wave:

Firstly, when posting code, data, or errors in the forum, please can you use the preformatted text </> button. It really helps us with readability, and copying and pasting your code (we don’t have to faff about replacing curly quote marks to get things working).

Please confirm how you validated that TLS 1.2 is enabled.

Are you behind a proxy/firewall that does TLS inspection?

Thanks for the response. I verified with one of our network guys that I am not behind a proxy/firewall that does TLS inspection.

The command I saw to run to be sure TLS 1.2 is in use is as follows:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Did you run this command first?

Connect-MicrosoftPlaces

Yes. I also had heard from someone on my team that I should connect to exchange first, then places.

So I ran these in order…

Connect-ExchangeOnline

Connect-MicrosoftPlaces

Initialize-Places

…This is where things start to go south on me. I pick option 1 to export suggested mapping to csv and it errors on starting gRPC call and SSL can’t connect.

If I type, “command *place*” I get a list of commands I can use that contain the word “place”. If I try the command to add a new place… New-Place -Name “BuildingName” …. I get the same errors.

I just tested that process (didn’t bother with Connect-ExchangeOnline), and didn’t get an error after selecting option 1. I’ve not used it before so didn’t do any configuration or set up any permissions.

It exported a CSV with titles only (I don’t have any data in Places).

I don’t think you have a PowerShell problem per se. If I was having this problem, my next step would be to start a packet capture and try to figure out what’s happening with the TLS negotiation.

I was trying without the Connect-ExchangeOnline bit at first too, then someone mentioned maybe it would be needed. I’m not having any luck with or without it, and since you were able to run the commands without that step, that definitely means that part isn’t needed.

I’m guessing you used PowerShell version 7. From what I seeing, 5.x wouldn’t work for these commands.

I may have to go with your suggestion regarding capturing packets. The last time I did that to troubleshoot something, I used Wireshark which was kind of difficult to sort through but was useful. Maybe it will be useful here as well. Thanks for the suggestion.

Yes, I’m running PowerShell 7.5.3

I suspect the MicrosoftPlaces module is using the Graph API. Have you tried running any of the Places commands from the Microsoft.Graph module to see if you get a similar error?

Finally getting back in here to get you a follow up. I did try the Graph API and wasn’t getting anywhere with that either. Since this whole time I have been seeing errors indicating I need to run PS as Administrator sprinkled through other error messages, it occurred to me that maybe an app we use called Threatlocker was getting in the way. It is an app that will block file access or executables and, even though I wasn’t seeing any pop-ups indicating things were being blocked, I started to wonder if maybe it was getting in the way of the microsoft places commands. Sure enough, I put my computer into Learning Mode in Threatlocker, which tells it to learn what I’m doing is safe…the commands started to work. For whatever reason, even though I haven’t had to do this for running powershell commands previously…say for exchange…I found TL would get in the way on the microsoft places stuff. So that’s the good news. I can run those commands now.

The bad news…even though I was able to add places…I can see buildings I’ve added in the list of places now, they still don’t show up in the work hours / location page under the location drop down. Still only have the defaults…Office…Remote. I started a Microsoft ticket to see what was up with that and after a bunch of back and forth, found that they require you to fully build out each site. So we would need add the building, floor, room, capacity…all kinds of extra stuff. We aren’t after such granular detail. We just want to add the building to the drop down. For now, we have put this idea on hold.

Thanks for the earlier ideas and back and forth trying to assist with this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.