Once your device is connected at least once and verified by the agent, you can use the TestProject platform to grab the device UDID, where you can input in your coded mobile tests for example.
Head over to the TestProject platform agents page: https://app.testproject.io/#/agents
At the agent's page, click on your agent.
3. Click on Devices
Here you can see Previously/Current connected devices and Simulators.
You can now copy the UDID to the clipboard and use it wherever you need.