Hi @Alexey Mykhailov
First of all, take a look documentation where the oauth2.0 flow is described.
Here is the link: https://learn.microsoft.com/en-us/entra/architecture/auth-oauth2
As you can see, validation will be done on your server side, and depending on your tech stack I can provide instructions on how to configure authentication on your server. Please let me know if further help is necessary.