Skip to main content
Community site session details

Community site session details

Session Id : L6/2yrHNKewMB1bGCW84ta
Power Automate - Building Flows
Answered

Integer value expected for attribute

Like (1) ShareShare
ReportReport
Posted on 9 Aug 2023 16:12:40 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!

  • Verified answer
    abm abm Profile Picture
    32,506 Most Valuable Professional on 09 Aug 2023 at 16:28:58
    Re: Integer value expected for attribute

    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete