If there's a strict policy of not letting anyone from outside the company to use the company WiFi, and if it's monitored, the logs may reveal that there was an unknown computer logged in using your friends credentials. The worst that could happen is that your friend will get some company policy based consequences, even get fired, but that's not in a scope of technological information security.
Usually the collected information could contain your MAC address, operating system type, hostname and of course it's possible to log any data transmitted during the connection. That could be used to identify you, for example if your hostname has your name in it (
MBP-agr96) or if the MAC address can be otherwise be connected to you.
The MAC address could be compared afterwards even if you
- delete all the traces of the connection from your clients settings as suggested
- delete all the related client side logs
- overwrite your entire hard drive.
The connection alone doesn't leave any tracking capabilities to your computer, but theoretically the same machine could be identified based on the the MAC address whenever you connect to a WiFi AP the same administrators have access to. In reality... ain't nobody got time for that.
Personally I'd protect company networks not only from unauthorized friends but from any unauthorized BYOD devices, too; either by using RADIUS for machine authentication instead of user authentication or by bocking any unknown MAC addresses i.e. with a MAC address whitelist.