WASHINGTON — Caroline Kennedy, the daughter of John F. Kennedy and one of President Obama’s most prominent supporters, was sworn in Tuesday as the United States ambassador to Japan.

She will leave for Tokyo on Thursday.

Ms. Kennedy, 55, a lawyer and author, has been the director of numerous nonprofit organizations. She also endorsed Mr. Obama’s candidacy in 2008 at a critical moment in his Democratic primary contest.

She has no special expertise in Japan. But she has a close relationship with the White House, as Secretary of State John Kerry mentioned during a reception on Tuesday night for Ms. Kennedy at the residence here of the Japanese ambassador.

Japan “knows that it is getting an envoy who has the ear of the president,” Mr. Kerry said. “And that, as we all know, is a vital thing in the conduct of foreign policy.”