Direct Answer: How Do I Assign a Security Group to a Resource Using the OnePlan APIs?
To assign a security group to a resource via the OnePlan API, set the
OnePlanSecurityGroup property on the Create
Resource API or Update Resource API to the
GUID of the desired security group, retrieved from the security groups
query endpoint.
What This Article Covers: API Permission Assignment
This article explains how to assign a resource’s security group
through the Create Resource and Update
Resource APIs using the OnePlanSecurityGroup
property, including how to retrieve group GUIDs and what happens when
the property is omitted or set to null.
APIs Covered
- Create Resource API: https://my.oneplan.ai/ApiHelp/Api/POST-api-resources
- Update Resource API: https://my.oneplan.ai/ApiHelp/Api/POST-api-resources-id
Assigning a Resource’s Security Group
The OnePlanSecurityGroup property is used to assign a
resource’s security group through the Create Resource
and Update Resource APIs. This property accepts the
GUID value that represents the target security group.
## Retrieving Security Group GUIDs
To get your security groups’ GUIDs, use the following query: https://my.oneplan.ai/ApiHelp/Api/GET-api-securitygroups.
The query returns a list of security groups — locate the desired group
and use its id property.
Setting “None” or Omitting the Property
- To set the None security group on a resource, set
the
OnePlanSecurityGroupproperty to an empty GUID (00000000-0000-0000-0000-000000000000). - If
OnePlanSecurityGroupis set to null, or is not included in the API request body:- A default security group is assigned only if a default security group is selected in your OnePlan group settings.
- Otherwise, the resource’s group is set to None.
Frequently Asked Questions: API Permission Assignment
Q: Which property do I use to assign a resource’s security group via the API?
A: In OnePlan, use the
OnePlanSecurityGroup property on the Create
Resource or Update Resource API, set to the
GUID of the target security group.
Q: How do I set a resource’s security group to None via the API?
A: In OnePlan, set the
OnePlanSecurityGroup property to an empty GUID
(00000000-0000-0000-0000-000000000000).
Q: What happens if I don’t include OnePlanSecurityGroup in my API request?
A: In OnePlan, if OnePlanSecurityGroup
is omitted or set to null, a default security group is applied only if
one is configured in your OnePlan group settings; otherwise the
resource’s group is set to None.
What to Do Next: API Permission Assignment
Learn more about Enterprise Security Groups: - Enterprise Security Groups in OnePlan - Overview
Related access management: - How to Grant Users Access to OnePlan via Entra Groups
Review the full process: - Resource Center Administration in OnePlan - Overview
Comments
0 comments
Article is closed for comments.