In dative, m/n : unserem, f: unserer, plural: unseren. A nice link to complete chart can be viewed at: https://deutsch.lingolia.com/en/grammar/pronouns/possessive-pronouns. Hope that helps.
Adjective endings depend on case, number, and gender, but they are also weakly or strongly inflected depending on whether or not they are accompanied by a definite or indefinite article or not.
That is to say, there is no one rule: it's a grammatical system. The following links take different approaches in presenting more information and may help you: