We are trying to get an access token in SharePoint on-premises 2016 server version.
Creating an app successfully using these steps in our SharePoint on-premise 2016: https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs
Following these steps for an access token:
Get code request:
https://sharepoint.tenant.com:0000/sites/live/_layouts/15/OAuthAuthorize.aspx?client_id=0000000-0000-0000-0000-00000000&response_type=code&redirect_uri=https://sharepoint.tenant.com:0000/sites/live/default.aspx&scope=Web.Manage
Not getting code.
But getting 401 unauthorized error in the access token process
error=server_error&error_description=The%20remote%20server%20returned%20an%20error%3A%20%28401%29%20Unauthorized%2E
Note: I am using admin account.