under application registration does the delegated permissions are admin consented? Make sure to have at least the delegated permission AppRoleAssignment.ReadWrite.All (requires admin consent)
AppRoleAssignment.ReadWrite.All