As mentioned in another reply, the info/logoUrl
is Read-only
in Microsoft Graph, we could not set it directly, also per my test, even the request returns 204
, it will not take effect.
My workaround is to use the Azure AD Graph API, you could try the request below in the postman, it works on my side.
Request URL:
PUT https://graph.windows.net/<tenant-id>/applications/<object-id>/mainLogo?api-version=1.6
In the postman, Authorization
-> Bearer token
-> fill your token, in the Body
, select binary
-> Select file
, then Send
.
Note: Your picture could not be large, otherwise you will get a The stream write request would result in an excessive number of bytes being written
error.
Check in the portal:
Besides, if you just want to set the logo Programmatically, you could use the powershell Set-AzureADApplicationLogo
, it is the easiest way I can find.
Set-AzureADApplicationLogo -ObjectId <object-id> -FilePath C:\Users\joyw\Desktop\pic1.jpg