auth0 / auth0.net

.NET client for the Auth0 Authentication & Management APIs.
https://auth0.com
MIT License
328 stars 163 forks source link

OrganizationCreateInvitationRequest documentation reports that SendInvitationEmail defaults to true , #727

Closed ardove closed 1 month ago

ardove commented 1 month ago

Checklist

Description

While testing an (enterprise) integration, I've found that the Auth0 ManagementApi SDK does NOT set the "SendInvitationEmail" parameter to true (even though the documentation says it defaults to true.

This aligns with what the rest api documentation says, but no emails are sent unless you actually set the invitaiton email to true. {3FAA1E5F-830B-41A7-B973-F40A0627A3B3}

Reproduction

  1. Invoke the client.Organizations.CreateInvitationAsync method with valid parameters.
OrganizationInvitation inviteResponse = await client.Organizations.CreateInvitationAsync(
    orgId,
    new OrganizationCreateInvitationRequest
    {
        ClientId = auth0ApplicationClientId,
        ConnectionId = _connectionId,
        Invitee = new OrganizationInvitationInvitee
        {
            Email = userEmail
        },
        Inviter = new OrganizationInvitationInviter
        {
            // this seems to only be for displaying in the auth0 dashboard
            Name = inviterName
        },
        // SendInvitationEmail = true
    });

Additional context

No response

auth0.net version

7.25.0

.NET version

4.8

kailash-b commented 1 month ago

This is fixed in the latest available version 7.27.0 Closing the issue now.