Mar 29 2019
- last edited on
Jan 14 2022
anybody who can me Point in the Right direction?
I want to check a mail nickname for creating an Office 365 Group via Graph API before the Group will be created, so that the requester could Change the nickname, if it´s unavailable.
I have found out, that you could do this via directoryObject/validateProperties (https://github.com/microsoftgraph/microsoft-graph-docs/blob/master/api-reference/beta/api/directoryo...).
I have tried to test that via Graph Explorer but I do not get it to work.
The goal is to implement this in my flow for requesting and creating a new Team in Office 365.
Mar 30 2019 03:13 AM
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.
Mar 31 2019 08:39 AM - edited Mar 31 2019 08:43 AM
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?
Mar 31 2019 09:58 PM
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).