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

How to get Exchange Online properties of Office 365 user by using Azure AD graph API ?

$
0
0

Hi,

I am using Azure Active Directory graph API to get Office365 users.  GET request returns users having Office365 attributes.

For example,

{
"odata.type": "Microsoft.WindowsAzure.ActiveDirectory.User",
"objectType": "User",
"objectId": "6b447fe3-1b30-25e9-bb54-013074ce6197",
"accountEnabled": true,
"assignedLicenses": [],
"assignedPlans": [],
"city": null,
"country": null,
"department": HR,
"dirSyncEnabled": null,
"displayName": "ABC",
"facsimileTelephoneNumber": null,
"givenName": null,
"jobTitle": null,
"lastDirSyncTime": null,
"mail": null,
"mailNickname": "xyz",
"mobile": null,
"otherMails": [],
"passwordPolicies": "None",
"passwordProfile": null,
"physicalDeliveryOfficeName": null,
"postalCode": null,
"preferredLanguage": null,
"provisionedPlans": [],
"provisioningErrors": [],
"proxyAddresses": [],
"state": null,
"streetAddress": null,
"surname": null,
"telephoneNumber": null,
"usageLocation": null,
"userPrincipalName": "ABC@contoso.onmicrosoft.com"
},

 This returned attribute set, which doesn't contain Exchange online attributes if user has exchange online license.

On the other hand if we use powershell to manage Exchange online, the we get many exchange online attributes

'Get-Mailbox' output will look like this,

AccountSkuId
contoso:STANDARDPACK
Alias
Adam
AntispamBypassEnabled
false
Database
NAMPR09AH019-db007
DeliverToMailboxAndForward
false
DisplayName
Adam
DistinguishedName

CN=Adam,​OU=contoso.onmicrosoft.com,​OU=Microsoft Exchange Hosted Organizations,​DC=NAMPR09AH01,​DC=prod,​DC=outlook,​DC=com

EmailAddressPolicyEnabled
false
EmailAddresses
SMTP:Adam@contoso.onmicrosoft.com
ExchangeGuid
0d223ae5-da81-1c3c-78e1-368de04e4d22
ExchangeUserAccountControl
None
ExchangeVersion
0.20 (15.0.0.0)
HiddenFromAddressListsEnabled
false
IsMailboxEnabled
true
Name
Adam
OrganizationalUnit
NAMPR09AH01.prod.outlook.com/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com
RecipientType
UserMailbox
SamAccountName
Adam
UMEnabled
false

So, how can i get above attributes with Azure Active Directory Graph API ?  There is REST API available for managing Exchange online ( https://msdn.microsoft.com/en-us/library/office/dn776319(v=exchg.150).aspx ) but it doesn't provide interface to get above mentioned attributes. Also there is no way to add\remove distributions\role group membership. 

Regards,

Sagar


Viewing all articles
Browse latest Browse all 16000

Trending Articles



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