none
Classical Rules Provisioning for Azure Groups (Using Graph MA) RRS feed

  • Question

  • I Am trying to use Microsoft Graph MA to provision groups to Azure. was wondering if anyone has done it or has the sample code for using classical rules (Code) to provision groups.

    One thing I am puzzled with is how the DN is set? If group is created manually, the CN is a hexadecimal.

    How do you set DN programmatically?

    Is this even supported?


    Nosh Mernacaj, Identity Management Specialist


    Wednesday, November 27, 2019 8:47 PM

Answers

  • I got it working, finally.

    I needed to set the attribute "id" which is the anchor. 

    So here is what you need, if anyone is looking for it

            #region prov_azure
            void Prov_Azure(MVEntry mventry)
            {

                ConnectedMA ManagementAgent;  
                int Connectors = 0;          
                ReferenceValue dn;            
                string rdn;                  
                CSEntry csentryNew;          

                ManagementAgent = mventry.ConnectedMAs["GroupManagement"];
                Connectors = ManagementAgent.Connectors.Count;       

                if (0 == Connectors)
                {

                    csentryNew = ManagementAgent.Connectors.StartNewConnector("group");               
                    csentryNew["displayName"].Value = mventry["accountName"].Value;                       
                    csentryNew["description"].Value = mventry["accountName"].Value;                        
                    csentryNew["mailNickname"].Value = mventry["accountName"].Value;                      
                    csentryNew["mailEnabled"].Value = "false";
                    csentryNew["securityEnabled"].Value = "true";
                    rdn = Guid.NewGuid().ToString();
                    csentryNew["id"].Value = rdn;
                    csentryNew.DN = ManagementAgent.CreateDN("CN=" + rdn +",OBJECT=group");
                   
                    csentryNew.CommitNewConnector();
                }
            }
            #endregion prov_azure


    Nosh Mernacaj, Identity Management Specialist



    • Marked as answer by Nosh Mernacaj Wednesday, November 27, 2019 9:52 PM
    • Edited by Nosh Mernacaj Wednesday, November 27, 2019 9:55 PM
    • Unmarked as answer by Nosh Mernacaj Wednesday, November 27, 2019 9:56 PM
    • Marked as answer by Nosh Mernacaj Wednesday, November 27, 2019 9:56 PM
    Wednesday, November 27, 2019 9:52 PM