Sale of rental property in non-resident state

Hello,

 

I am a full time resident of MI and sold a rental house in MN in 2023. Do I pay capital gains on the profit in MI, where I live or MN, the state where the house is located?

 

Thanks