You can use admin auth session for this
Example with plugin for \Magento\Sales\Api\OrderManagementInterface
Acme/StackExchange/Plugin/Sales/Api/OrderManagementInterfacePlugin.php
<?php
declare(strict_types=1);
namespace Acme\StackExchange\Plugin\Sales\Api;
use Magento\Backend\Model\Auth\Session as AuthSession;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Sales\Api\OrderManagementInterface;
class OrderManagementInterfacePlugin
{
/**
* @var AuthSession
*/
protected $authSession;
public function __construct(
AuthSession $authSession
) {
$this->authSession = $authSession;
}
public function afterPlace(
OrderManagementInterface $subject,
OrderInterface $result,
OrderInterface $order
): OrderInterface {
if ($this->authSession->getUser()) {
// the order placed by admin
$firstName = $this->authSession->getUser()->getFirstName();
$lastName = $this->authSession->getUser()->getLastName();
// your logic here
}
return $result;
}
}