Could not obtain a WAC access token

Sometimes the WAC access token is obtained and other times not.

Can someone help me. There are multiple processes that use Office365.