Hi @Ajithkumar M ,
You can use Microsoft Graph API extensionProperty to have custom attributes which can be added to users, groups, application and devices.
Create Extension :
POST request:
https://graph.microsoft.com/v1.0/applications/xxxe7035-47d1-xxx-xxx-ffa55xxxx/extensionProperties
{
"name": "extensionName",
"dataType": "string",
"targetObjects": [
"User"
]
}
here id – object id of application
Response –
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#applications('xxxe7035-47d1-xxx-xxx-ffa55xxxx')/extensionProperties/$entity",
"id": "837d4292-87e6-41c4-8f35-f4f0bef9c1d3",
"deletedDateTime": null,
"appDisplayName": ".Net Core Graph Tutorial",
"dataType": "String",
"isSyncedFromOnPremises": false,
"name": "extension_49f9b798fcb9421dbb107cf9c8f03fd5_extensionName",
"targetObjects": [
"User"
]
}
Update custom attribute using
Patch request:
https://graph.microsoft.com/v1.0/users/{user id}
{
"extension_49f9b798fcb9421dbb107cf9c8f03fd5_extensionName": "isPresent"
}
Delete custom attribute using
DELETE https://graph.microsoft.com/v1.0/applications/{application ObjectId}/extensionProperties/{id}
Reference: https://learn.microsoft.com/en-us/graph/api/resources/extensionproperty?view=graph-rest-1.0
Hope this will help.
Thanks,
Shweta
-----------------------------------
Please remember to "Accept Answer" if answer helped you.