How to use mailNickName in Graph API

Roy Asterley 1 Reputation point
2023-01-04T09:03:29.82+00:00

How can I use the Azure AD mailNickName attribute in my app registration call?

There doesn't seem to be an option to select it as an attribute to send in the UI.

Thank you for your help.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-01-04T15:29:52.283+00:00

    Hi @Roy Asterley ,

    mailnickname is returned only if included in $select, user - properties.
    A Sample request to get mailnickname of users.

    GET https://graph.microsoft.com/v1.0/users?$select=id,userPrincipalName,mailnickname  
    

    Using the below Graph API we can get user from mailnickname from Azure AD.

    GET https://graph.microsoft.com/v1.0/users?$filter=mailnickname eq 'AlexW'  
    

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    1 person found this answer helpful.
    0 comments No comments

  2. Roy Asterley 1 Reputation point
    2023-01-04T15:34:18.963+00:00

    Hi Saranya,

    Thank you very much for your answer. Is it possible to add this to the Manifest in app registrations?


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.