Hi @Sakthi • Thank you for reaching out.
This is a problem with Graph SDK as the SDK is discarding the null attribute. This is not specific to mobilePhone attribute. If you set any other attribute like Country or City to null, you will experience the same behavior.
When we set a specific value to the country attribute, the patch request looks like this:
{"country":"US","@odata.type":"microsoft.graph.user"}
If we set the country to null, the patch request will look like this:
{@odata.type":"microsoft.graph.user"}
This is why the previously assigned value doesn't get changed as the patch call doesn't include any information about the attribute you are trying to set as null.
I would suggest you post feedback at msgraph-sdk-dotnet so that the team working on the SDK can help you address the issue.
Setting any attribute to null using Graph Explorer works. The problem occurs only when the null value is being set using Graph SDK.
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.