Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

Azure AD Graph REST APIs, user creation and proxyAddresses

$
0
0

Hello,

Let's consider an Office 365 domain, "example.com" ("examplecom.onmicrosoft.com") and create a new user thru the management portal (https://portal.office.com/Admin/Default.aspx#ActiveUsersPage), by clicking the "+" button and entering following information:

    given name: John
    surname: Doe
    user name: john.doe@example.com
    password: (enter twice)
    licence: an Office 365 licence with Exchange

With just that information, it appears I may send emails at both addresses "john.doe@example.com" and "john.doe@examplecom.onmicrosoft.com".

This is exactly what I need. :-)

And indeed, the management portal shows that John Doe has been created with both a main email address and an alternate email address. Moreover, looking at the user's record with an HTTP GET request (thus making use of the Azure AD Graph REST APIs), it appears that it contains amongst others:

    "mailNickname": "john.doe"
    "userPrincipalName": "john.doe@example.com"
    "mail": "john.doe@example.com"
    "proxyAddresses": [
        "smtp:john.doe@examplecom.onmicrosoft.com", 
        "SMTP:john.doe@example.com"
    ]

Now, let's create a record for Bob Shaw thru two consecutive HTTP POST requests (again making use of the Azure AD Graph REST APIs):

    the first for creating the base user record,
    the second for assigning the licence.

I may send emails to "bob.shaw@example.com", but emails to "bob.shaw@examplecom.onmicrosoft.com" are rejected (unknown recipient address).

Looking at the user's record:

    "mailNickname": "bob.shaw"
    "userPrincipalName": "bob.shaw@example.com"
    "mail": "bob.shaw@example.com"
    "proxyAddresses": [
        "SMTP:bob.shaw@example.com"
    ]

And the management portal doesn't show any alternate email address.

I must be doing something wrong...

How could I create, thru the Azure AD Graph REST APIs, a user with both email addresses "@example.com" and "@examplecom.onmicrosoft.com"?

TIA,
Axel


Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>