I want to add extensions to a User using GraphClient. I couldn't find the proper C# code anywhere. Can anyone help?
Dictionary<string, object> addData = new Dictionary<string, object> {
{
"HoloFlag",
currentUser.UserPrincipalName
}
};
var extPatchObject = new OpenTypeExtension();
extPatchObject.ExtensionName = "com.holobeam3.extension";
extPatchObject.AdditionalData = addData;
try {
var extension = await _graphClient
.Me
.Extensions
.Request()
.AddAsync(extPatchObject);
Debug.Log(extension);
} catch (Exception ex) {
Debug.Log(ex.Message);
}
This is what I tried so far. This returns an "access denied" exception but there is no issue in accessing existing extensions or other Me
endpoints of the User.