That's a wide open question
Do you wish to take photos "of the building" or just "from the building"
Government building? Private building?
Do you want to sell the images?, post on the internet?
Lots of variables, but start with talking to the person in charge of the building (manager or owner).
Sometimes, it's just a matter of asking. Who owns the building will determine the answer. Sometimes, it takes a little rooting around to find the right person to ask.
I've been allowed up the same day I asked for some, I've had to go through a federal background check for one, and I've been flat-out denied as well. As long as you're honest and straight-forward, there's usually no issues.
As a 'thank you' to those who permit me access, I send 'em a copy of my results.
First, call the front desk asking to speak with maintenance- if there is another branch located somewhere, say you're from there, in town with some equipment they need. If they ask you who you want to speak with, ask who's currently working. When they give you the names, write down the time, date and name or commit them to memory. Also write down the receptionist's name.
Then, later that day or the following day, call back and pretend to be one of the people whose name you wrote down. Use a different voice. Say you've got a new maintenance guy starting in a couple of hours, but you couldn't wrangle up a key for him yet. Give them a fake name coordinated with fake ID you've already put together, just in case. Then go put on the maintenance uniform you sewed together the night before.
You're almost done. Make your way to the building, and talk to the receptionist who should let you through. If anyone else stops you, drop the name of the receptionist and NOT the other maintenance guys, so the stopper won't be able to unravel your loose end. Say you're an outside contractor doing some special electrical work. If they still aren't buying it, knock them unconscious with your tripod.
And that's all there is to it!
(Alternatively, asking politely works 92.51% of the time, 99.99% with goodish measures of friendliness, confidence and charm thrown into the mix).