Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

New-MgExternalConnectionItem returns 404 errors

Aberta
#3,375 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
powershell
Domínio
api

Direção de pesquisa

Comece pelo ponto de entrada New-MgExternalConnectionItem e compare a solicitação que ele gera com a documentação do Microsoft Graph para adicionar um item vinculada no issue. Reproduza a solicitação POST e verifique se o cmdlet usa a URL e o método documentados para o item; em seguida, confirme que o comando armazena o item criado com sucesso.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Status: Needs Investigation type:bug
Describe the bug

I am trying to create new external connection items for an external connector, and I get a 404 not-found error message in response.
Here is the command I use-
$newItem = New-MgExternalConnectionItem -ExternalConnectionId "samplecon" -id $id -Properties $props -Content $content -Acl $acl

A fiddler trace of the above call shows this-
POST https://graph.microsoft.com/v1.0/external/connections/samplecon/items

The body is this-
{
"id": "R06",
"acl": [
{
"accessType": "grant",
"type": "everyoneExceptGuests",
"value": "56713e33-e7c4-4ce4-ac45-a4ae33ab87b7"
}
],
"properties": {
"title": "Adding Test Items",
"language": "hu-HU",
"floor": [
"London_B1"
],
"[email protected]": "Collection(String)",
"recordId": "R06"
},
"content": {
"type": "text",
"value": "A new item R06"
}
}

Expected behavior

I expect the new-item to be created and stored in the $newItem variable.

How to reproduce
  1. connect with MGGraph-
    Connect-MgGraph -ClientId "{client_id}" -TenantId "{tenant}.onmicrosoft.com" -certificate $x509Cert

#Make sure the app has ExternalConnection.ReadWrite.OwnedBy | ExternalConnection.ReadWrite.All and ExternalItem.ReadWrite.OwnedBy | ExternalItem.ReadWrite.All

  1. create the external connection
    $newConnector = New-MgExternalConnection -BodyParameter $connector

  2. add the schema for the external connection
    $schemaUpdateResp = Update-MgExternalConnectionSchema -ExternalConnectionId $newConnector.Id -BodyParameter $schema

  3. add an external connection item to the connection
    $newItem = New-MgExternalConnectionItem -ExternalConnectionId "samplecon" -id $id -Properties $props -Content $content -Acl $acl

SDK Version

2.27.0 Microsoft.Graph.Search

Latest version known to work for scenario above?

?

Known Workarounds

The $id, $acl, and $props are all good because if I use fiddler to resend the request, but modify it to use the verb PUT and add the ID to the URL, it works. This is how the Graph REST API has in the documentation-
https://learn.microsoft.com/en-us/graph/connecting-external-content-manage-items#add-an-item

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
Linguagem predominante
C#
Estrelas
901
Forks
232
Merge médio
1d 5h
PRs com merge (30d)
20

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoftgraph/msgraph-sdk-powershell

Todas as issues de microsoftgraph/msgraph-sdk-powershell

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.