Hi @Kenta Matsunaga,
Version 1.21.0 uses Microsoft.Graph.Core 1.21.0 as dependencies, while version 5.39.0 uses Microsoft.Graph.Core 2.0.8 as dependencies. So the way they call will be different.
In 5.39.0, there is no reference to Microsoft.Graph.User, just use using Microsoft.Graph;
. Microsoft.Graph already includes User.
For more detail, you can refer to the official documentation to Choose A Microsoft Graph Authentication Provider and Create requests.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.