web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Integer value expected...
Power Automate
Answered

Integer value expected for attribute

(1) ShareShare
ReportReport
Posted on by 169

Hello everyone,

I've encountered an issue while adding a custom security attribute using the Microsoft Graph API. I'm hoping someone can help shed light on this situation.

Specifically, when I try to add the custom attribute "level" within the "org" part of the customSecurityAttributes object using the following JSON:

 

{
 "customSecurityAttributes": {
 "org": {
 "level": 1,
 "@odata.type": "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
 }
 }
}

 

I receive the following error: "'Integer value expected for attribute.'. ParameterName: 'org_level' ParameterValue: '1'."

However, when I manually retrieve the attribute for a user, its structure appears as follows:

 

{
 "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(customSecurityAttributes)/$entity",
 "customSecurityAttributes": {
 "org": {
 "@odata.type": "#microsoft.graph.customSecurityAttributeValue",
 "employeetype": "student",
 "level": 2
 }
 }
}

 

I've noticed that adding the employeetype attribute works fine. However, when attempting to add the "level" attribute with a numeric value, I encounter the mentioned error.

Does anyone have experience with this issue or know why this error is occurring? Is there a specific way that numeric values for customSecurityAttributes need to be formatted or represented?

Bambula_0-1691597401344.png

Bambula_1-1691597481239.png

 

Thank you in advance for any assistance!

Categories:
I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,964 Most Valuable Professional on at

    Hi @Bambula 

     

    Believe you are trying to add the custom attribute "level" so you need to define the data type.

     

    Try the below

     

    {
    "customSecurityAttributes": {
    "org": {
    "@odata.type": "#Microsoft.DirectoryServices.CustomSecurityAttributeValue",
    "level@odata.type":"#Int32",
    "level": 1
    }
    }
    }

     

    Reference: Assign, update, list, or remove custom security attributes for a user (Preview) - Microsoft Entra | Microsoft Learn

     

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 265 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 203 Most Valuable Professional

#3
trice602 Profile Picture

trice602 202 Super User 2025 Season 2

Last 30 days Overall leaderboard