-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provisioning SecurityGroupDefinition fails #790
Comments
The model looks good, should be fine. Would you please provide .InnerException message? M2 exception has .InnerException that contains original SharePoint exception. That would help to address the issue. |
Here's the complete stack trace
|
Alright, leave it with us, will see what's wrong there. We run regression testing on SP2013 only. |
Thank you. By the way, I also tried adding |
No, only props with ExpectRequired attr are required. |
Checked on SharePoint 2010, all good. Security groups deployment is only supported at the site level. Here is the full snippet: public void CanDeploySimpleSecurityGroup()
{
var auditors = new SecurityGroupDefinition
{
Name = "External Auditors",
Description = "External auditors group."
};
var reviewers = new SecurityGroupDefinition
{
Name = "External Reviewers",
Description = "External reviewers group."
};
var model = SPMeta2Model.NewSiteModel(site =>
{
site
.AddSecurityGroup(auditors)
.AddSecurityGroup(reviewers);
});
DeployModel(model);
}
private void DeployModel(ModelNode model)
{
var service = new SSOMProvisionService();
using (var spSite = new SPSite("http://m2-sp10-01"))
{
using (var spWeb = spSite.OpenWeb())
{
service.DeploySiteModel(spSite, model);
}
}
} With service.DeployWebModel(spWeb , model); call a new SPMeta2UnsupportedModelHostException exception is raised which is default expected behavior.
|
I'm trying to provision security groups in SharePoint 2010 but it failed with an exception
Check ModelNode prop
Using the following code found [here](http://docs.subpointsolutions.com/spmeta2/definitions/sharepoint-foundation/SecurityGroupDefinition/#Adding security group)
I'm using the latest version of M2.
The text was updated successfully, but these errors were encountered: