Recently while playing around with UserProfileManager, I came across a very strange issue where I couldn’t find much help on the internet. After some researching here and there, I finally found that the issue was just a permission issue. While trying to use UserProfileManager in my code, I was passing the SPServiceCOntext object to it and while creating an object of UPM, the error I was getting was
UserProfileApplicationNotAvailableException_Logging :: UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does not have 607c1325-164c-4da5-8bd0-e28be323a06c
The resolution of this is to assign Full Control permission to the User Profile Service in Central Administration. In my case, it was my account and as I gave it full control, it ran smoothly. Follow the screenshots for details.
Navigate to Central Administration > Application Management > Manage Service Applications and select User Profile Service
Click on Permissions
Add the account which runs the designated code.
Hope this helps someone.