Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do what I can to provide the right answer to your question.
It is possible that your camera has a problem, e.g. with either the flash control circuits, or the light-sensitivity sensing, or other things.
But to make quite sure it isn't an obscure interaction with an obscure setting(s) (combination, perhaps), you should do a Factory Settings Reset, and try it once again... then if it's the same, you definitely would need to choose between repairing it and replacing it, or just putting up with the flash deficiency doubtfully, or even using an auxiliary flash if possible and if you would prefer it.
Is the camera less than a year old?