Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Upload app logo resulted in Error

Open
#745 7 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
api, backend

Research direction

Start at the Applications().ByApplicationId(...).Logo().Put entry point and reproduce the request with the headers and image data shown. Inspect the outgoing Content-Type values and the Microsoft Graph 400 response, then verify the upload succeeds without the text/html parsing error.

Written by the indexing model from the issue text.

Description

Using the below code to upload an Logo for a given App:

headers := abstractions.NewRequestHeaders()
	headers.Add("Content-Type", "image/jpg")
	configuration := &applications.
		ItemLogoRequestBuilderPutRequestConfiguration{
		Headers: headers,
	}
	appLogo, err := os.ReadFile(appLogoFile)
	resp, err := client.Applications().ByApplicationId(appObjectID).Logo().Put(
		ctx,
		appLogo,
		configuration,
	)

However this results in the below error:
content type text/html does not have a factory registered to be parsed
On debugging further it was found that the APi call results in a a Bad Request 400 erro and the same is getting set in response body resulting in above error.
Looks like Content-tye is set to 2 values image/jpeg and application/octet-stream . Not sure if this is causeing the request to the MS graph API to fail

Dominant language
Go
Stars
335
Forks
43
Avg merge
6h 42m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoftgraph/msgraph-sdk-go

All issues in microsoftgraph/msgraph-sdk-go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.