Prince Harry has been given his first major public role in a sign of his growing importance as a senior royal.