Summary: Microsoft 365 connectivity troubleshooting may sometimes require an in-depth look at the traffic packets between the client PowerShell modules or API components and Microsoft 365 cloud services. This article describes the steps required to collect this traffic
Applies to: Cayosoft Administrator 6.0 or later
ID: KB20201011-1
Overview
Wireshark is a free and open-source network protocol analyzer, recommended by Microsoft as a replacement for their own deprecated tools (link). The steps below describe how to use Wireshark to collect the network traffic information required to troubleshoot some connectivity issues.
Preparation
- Download and install Wireshark from: https://www.wireshark.org/#download on the machine running the Cayosoft Administrator server
- While on the same server, open a command prompt and execute this command: ping provisioningapi.microsoftonline.com
NOTE: the URL might change depending on the original connectivity issue. Please, consult Cayosoft Support for details. - Grab the resolved IP address, in this example 40.126.9.97
- Add this entry to the windows hosts file
- Run notepad.exe as administrator
- Open the %windir%\System32\drivers\etc\hosts file
- Add an entry for the resolved IP like "40.126.9.97 provisioningapi.microsoftonline.com"
- Save the hosts file
Using Wireshark
- Run Wireshark as administrator
- Set the filter to include only traffic to the IP resolved in the previous section using "host <ip address> and select the network interface used to connect to the Internet:
- Start capturing packets:
- Open a Power Shell prompt and run the test command(s):
- For example, to capture network operations when connecting from MSOL PowerShell module, execute this command: Connect-MsolService -AzureEnvironment AzureCloud
- When prompted, login using the same Microsoft 365 account as used in the Cayosoft Administrator service
- Execute: Get-MsolUser
- Return to Wireshark and stop the packet capture
- Go to File > Save, specify a location and file name, for example, “MSOLtraffic.pcap"
- Send this file to Cayosoft Support
- Remove the "provisioningapi.microsoftonline.com" entry from the hosts file
- Run notepad.exe as administrator
- Open the %windir%\System32\drivers\etc\hosts file
- Remove the new entry added in the preparation section
- Save the hosts file
Related Articles
KB20180503-1 Troubleshooting connection to Office 365
Comments
0 comments
Please sign in to leave a comment.