Skip to content

I am using Per-Tenant Data with identity but the AddLoginAsync from Identity library won't work #926

@paburgos

Description

@paburgos

Hello,

I am wondering if you can suggest a fix for this issue:

I am using Per-Tenant Data with identity, And as the documentation describes I can see the TenantID added as a primary key to the AspNetUserLogins table. However, when I try to add a login:

result = await UserManager.AddLoginAsync(user, externalLoginInfo);

I get this exception:

'System.InvalidOperationException': Unable to track an entity of type 'IdentityUserLogin<string>' because its primary key property 'TenantId' is null.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions