Question: what is the difference between service principal and managed identity?
Answer: So an managed identity (MSI) is basically a service principal without the hassle. ... The addition of the "identity" section means that the functions app will be given a system-assigned managed identity (MSI) on deployment.