Forum Discussion
Graph API - validate mail nickname
Have you tried this under beta endpoint, seems this api still not supported in production endpoint (v1.0) and the reference you mentioned here also pointing to the beta endpoint.
Both success (mailNickName available) and failure (mailNickName already used) cases are working fine for me in Graph Explorer. Attached the results.
Since you have mentioned about Flow, hope you can use the Status Code (Success: 204) to move forward through Flow.
- Andreas SchlüterMar 31, 2019Brass Contributor
thank you very much for your Input!
What User-ID do I have to take for "onBehalfofUser"?
And how do you check the mail nickname against the Directory? Maybe, the nickname is not in use for a Group but otherwise for a distributionlist or an alias of a user?
Thanks!
- Kevin_MorganApr 01, 2019Iron Contributor
User-ID : The UserID is Id of the user who is going to create group. Most probably, it should be the current user, so you can get it ("id" property) from "me" endpoint (https://graph.microsoft.com/v1.0/me).
mailNickName : The mailNickName is nothing but the mail alias for the new group that you are going to create (for ex: if you want your new group email address like "o365Group@contoso.com" - then here 'o365Group' is nickname).