Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Please give me the information about How to Create Organization through Scripting with the Different Users and password .
I Created one table with user name and password in Database, I want to run the script so that it create the organization with users and with the different accessibility.
Solved! Go to Solution.
@ShanuGarg : Under services - select Entities tab- from there select that entity on which you need to add permissions.
here we have snippets to provide all permissions (Visibility, Runtime & DesignTime)- for ex in below snippet i am assigning design time permissions to my testmashup
////////////////////
var params = {
principal: "userA" /* STRING */,
allow: true /* BOOLEAN */,
type: "Update" /* STRING */,
principalType: "User" /* STRING */
};
// no return
Mashups["testmashup"].AddDesignTimePermission(params);
You can use EntityServices resource (snippet "CreateUser"),
var params = {
password: undefined /* STRING */,
name: undefined /* STRING */,
description: undefined /* STRING */,
tags: undefined /* TAGS */
};
// no return
Resources["EntityServices"].CreateUser(params);
Similarly, with organization, CreateOrganization
var params = {
topOUName: undefined /* STRING */,
name: undefined /* STRING */,
description: undefined /* STRING */,
topOUDescription: undefined /* STRING */,
tags: undefined /* TAGS */
};
// no return
Resources["EntityServices"].CreateOrganization(params);
And look into setting permissions.
That's fine,
but I also want to assign the permissions through Scripting
How?
@ShanuGarg : Under services - select Entities tab- from there select that entity on which you need to add permissions.
here we have snippets to provide all permissions (Visibility, Runtime & DesignTime)- for ex in below snippet i am assigning design time permissions to my testmashup
////////////////////
var params = {
principal: "userA" /* STRING */,
allow: true /* BOOLEAN */,
type: "Update" /* STRING */,
principalType: "User" /* STRING */
};
// no return
Mashups["testmashup"].AddDesignTimePermission(params);
Hi @ShanuGarg.
If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon