Create Custom Column - Access Denied

Copper Contributor

Hi Community

 

Running an external APP logging on to Teams(Sharepoint). Get an error when I try to create a custom column. Usually the ODataError object will list up the API permission the I'm missing but this time around I only get 'Access Denied'. Anyone knows what permission I'm missing.

 

Cheers
Tore

 

 

var columnDef = new Microsoft.Graph.Models.ColumnDefinition
{
Description = "test1",
EnforceUniqueValues = false,
Hidden = false,
Indexed = false,
Name = "Title1",
Text = new TextColumn
{
AllowMultipleLines = false,
AppendChangesToExistingText = false,
LinesForEditing = 0,
MaxLength = 255,
},
};

try
{
// Returns 43 list columns
var colums = await _graphClient.Drives[item.ParentReference.DriveId].List.Columns.GetAsync();
//Throws Access Denied error
var result = await _graphClient.Drives[item.ParentReference.DriveId].List.Columns.PostAsync(columnDef);
}

catch (ODataError err)
{
//Access Denied
}

0 Replies