Invalid character error when inviting guest users

TravisL-8208 1 Reputation point
2022-07-21T21:24:36.583+00:00

Azure AD is saying a particular e-mail address is invalid when attempting to perform guest invitations.
E-mail address format: ******@ci.city-name.state.us (user, city, state redacted for this post)
The error from the Azure web console is: Invalid characters or syntax for an email address. Enter a full email address such as someone@ssss .com

If I remove the hyphen, the error text will go away, if I add the hyphen back in, the error text does not return, I get a green checkmark and the invitation gets sent.
At first glance, it seems like a bug in the input validation. The e-mail address is a functioning local city government address.
Bulk invites so far have not been successful.

Microsoft Security Microsoft Entra Microsoft Entra External ID
Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Sandeep G-MSFT 20,906 Reputation points Microsoft Employee Moderator
    2022-07-22T15:59:28.14+00:00

    @TravisL-8208

    Thank you for posting your question in Microsoft Q&A.

    I tried the same in my lab tenant and even I got an error initially. Later when I investigated it further, I found I had added an extra space at the end of the email address.

    Later I tried to create new account with another domain suffix which has a hypen "-" chracter it in and it went through without any issues.
    Can you confirm if you do not have any spaces at the end of email address? Also, you can try to check with any other email address with domain suffix and let me know the behavior.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

  2. Ed Harrison 336 Reputation points
    2022-07-22T16:03:41.567+00:00

    Hi @TravisL-8208 ,

    Thanks for reaching out to the community. Reading through your question, am I correct in saying that the only issue you're seeing is when you first type the address (containing a hyphen) you get the error, but removing and re-adding the hyphen then works and the invitation goes through?

    Is this on the "New user" page in Azure AD? I ask because when I try this on my tenant, I don't see the same error. As I type the email, I do get the invalid character error when I first type the hyphen (as this isn't valid at the end of an email address):

    223855-image.png

    A top level domain can't include a hyphen, so this error persists until I add "name.state" but then the error disappears:

    223856-image.png

    It pops back again, when I put in the "." (email address can't end with a dot),

    223882-image.png

    but then drops out again once I type "us":

    223830-image.png

    Are you seeing different behaviour? I believe this is all client-side checking, so it's possible this is actually browser dependent. What browser are you using (I'm using Edge version 103.xxx)? Do you see the same behaviour if you try a different browser?

    When you are able to get the green tick mark, does the invitation go through correctly to the recipient?

    You say that bulk invites have not been successful - I assume you're doing something like the process described in https://learn.microsoft.com/en-gb/azure/active-directory/external-identities/tutorial-bulk-invite. Are failures occurring just for addresses with the hyphen, or have you been unable to get any bulk invites to work?

    --- if this has been helpful, please upvote and mark as answer if appropriate ---

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.