0

I need the Regex validation for the Email format for the Azure External user email.

EX: When I tried to invite the user with Email tarun.d+test1@gmail.com, I got the validation error, I need the same validation using C#.

Any document reference for the same please. enter image description here

Update:

As per the MSDN Doc https://learn.microsoft.com/en-us/graph/api/resources/invitation?view=graph-rest-1.0

The following special characters are not permitted in the email address:

Tilde (~)
Exclamation point (!)
Number sign (#)
Dollar sign ($)
Percent (%)
Circumflex (^)
Ampersand (&)
Asterisk (*)
Parentheses (( ))
Plus sign (+)
Equal sign (=)
Brackets ([ ])
Braces ({ })
Backslash (\)
Slash mark (/)
Pipe (\|)
Semicolon (;)
Colon (:)
Quotation marks (")
Angle brackets (< >)
Question mark (?)
Comma (,)

However, the following exceptions apply:

A period (.) or a hyphen (-) is permitted anywhere in the user name, except at the beginning or end of the name.

An underscore (_) is permitted anywhere in the user name. This includes at the beginning or end of the name.

Can anyone help me with the Regex Expression to validate with above special characters

TARUN
  • 241
  • 1
  • 8
  • 27

0 Answers0