It's extremely difficult.
For some people it comes naturally and always will, other's it's painfully difficult.
You must have a conventional personality that is align with what's considered popular or interesting in your workplace.
If this isn't the case, don't bother because even if you try to confidently pull off a strange or unconventional personality, it won't work.
I was very 'confident' in high school, had a loud, goofy, silly, playful personality, but plenty of people found me annoying and didn't like me.
My sense of humor was extremely random, just throwing anything at the wall and seeing what stuck.
In senior year I went to a new school and was a little more liked. I wasn't so stupidly random with my humor but was more tactful and put more thought into what I did and said.
Honestly, what you need to understand is also a lot of people have their own already existing biases before you even open your mouth.
If you're significantly overweight for example, or have an unattractive looking face, etc. than from the get-go people will treat you discriminately.
You haven't given me much to work with, like how to be charismatic in certain situations, but here's my advice:
1. Do you want charisma, confidence or assertiveness? These are all slightly different in their own ways. Personally, I see charisma as good social skills, making people laugh, banter, etc. confidence as self-belief, and assertiveness as being dominant and getting what you want.
2. All social groups are the same, in that each group has its own 'theme'.
EVERY social group you'll ever join has acceptable humor, unacceptable humor, acceptable topics to talk about, unacceptable things to talk about, etc. and these all depend entirely on the group.
Your workplace probably has social groups as well and is cliquey.
A charismatic man is in-tune and adapts and conforms to the theme of the group.
If it's a 'nerd' group that talks mostly about science and maths and most of the group members find talking about sports boring, a charismatic man will chameleon himself to the group and be able to blend-in.
3. So firstly, find a group of people to befriend who are most similar to you.
If your personality is too unconventional and doesn't fit into any group well enough, you can keep trying but it'll be more difficult than if you had a more conventional personality, you can instead try to impress and befriend people individually, or not bother trying at all.
4. A charismatic man has confidence, he believes he is an interesting and likable person once he makes the effort. Do you have confidence yet?
5. A charismatic man also has interesting stories and experiences to tell, he needs to back-up his confidence with real-world evidence that he has done a lot and seen a lot.