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

Announcements

News and Announcements icon
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,981 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 86 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 55

#3
Ellis Karim Profile Picture

Ellis Karim 53 Super User 2026 Season 1

Last 30 days Overall leaderboard