In a customer org, Api calls are made using a
NamedCredential using an
AuthProvider. I didn't configure this but my own code fails with 401 Unauthorized. When I going to the NamedCredential and trigger the Auth Flow again it works.
I'm an Oauth newbie but I thought after this initial Authorization when the
NamedCredential is saved the token is useable for all time.
Is there something configured incorrectly in Salesforce or in the API backend? Any tips and recommendations are welcome.