You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Set-MgOrganizationBrandingLocalizationBackgroundImage can't run because there is no way to pass the content type of the image file used to update the background image used for corporate branding.
To Reproduce
Steps to reproduce the behavior:
Execute Set-MgOrganizationBrandingLocalizationBackgroundImage
2.Set-MgOrganizationBrandingLocalizationBackgroundImage -OrganizationId $TenantId -InFile $DefaultYearImage -OrganizationalBrandingLocalizationId 0
Set-MgOrganizationBrandingLocalizationBackgroundImage_Set: Invalid Image Content-Type 'application/octet-stream'. Image Content-Type header should be one of the following: [image/bmp, image/jpg, image/jpeg, image/gif, image/vnd.microsoft.icon, image/png, image/exif, image/tif, image/tiff, image/, images/].
Run the problematic command with -Debug and paste the resulting debug stream below.
⚠ ATTENTION: Be sure to remove any sensitive information that may be in the logs.
Confirm
Are you sure you want to perform this action?
Performing the operation "Set-MgOrganizationBrandingLocalizationBackgroundImage_Set" on target "Call remote
'PUT
/organization/{organization-id}/branding/localizations/{organizationalBrandingLocalization-id}/backgroundImage
' operation".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
DEBUG: ============================ HTTP REQUEST ============================
Body:
{
"error": {
"code": "Request_BadRequest",
"message": "Invalid Image Content-Type 'application/octet-stream'. Image Content-Type header should be one of the following: [image/bmp, image/jpg, image/jpeg, image/gif, image/vnd.microsoft.icon, image/png, image/exif, image/tif, image/tiff, image/, images/].",
"innerError": {
"date": "2024-01-23T18:31:55",
"request-id": "9ecd54c3-1e2d-4ff3-8a16-02ebbf23458f",
"client-request-id": "73fb9c4e-8ada-4825-8224-11153e5eaf07"
}
}
}
Set-MgOrganizationBrandingLocalizationBackgroundImage_Set: Invalid Image Content-Type 'application/octet-stream'. Image Content-Type header should be one of the following: [image/bmp, image/jpg, image/jpeg, image/gif, image/vnd.microsoft.icon, image/png, image/exif, image/tif, image/tiff, image/, images/].
DEBUG: [CmdletEndProcessing]: - Set-MgOrganizationBrandingLocalizationBackgroundImage end processing.
Module Version
Please run Get-Module Microsoft.Graph* after cmdlet execution and paste the output below.
If a module cannot be installed or imported, please run Get-Module -ListAvailable and paste the output.
2.12
Tried with both the V1.0 and beta cmdlets. Same result.
Please run $PSVersionTable and paste the output below. If running the Docker container image, indicate the tag of the image used and the version of Docker engine.
Name Value
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Thanks for reporting the bug. Please ensure you've gone through the following checklist before opening an issue:
Describe the bug
To Reproduce
Steps to reproduce the behavior:
2.Set-MgOrganizationBrandingLocalizationBackgroundImage -OrganizationId $TenantId -InFile $DefaultYearImage -OrganizationalBrandingLocalizationId 0
Set-MgOrganizationBrandingLocalizationBackgroundImage_Set: Invalid Image Content-Type 'application/octet-stream'. Image Content-Type header should be one of the following: [image/bmp, image/jpg, image/jpeg, image/gif, image/vnd.microsoft.icon, image/png, image/exif, image/tif, image/tiff, image/, images/].
Status: 400 (BadRequest)
ErrorCode: Request_BadRequest
Date: 2024-01-23T18:31:18
Headers:
Cache-Control : no-cache
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : a45c633d-2aec-401b-b552-89b23f623ec1
client-request-id : c87a2eb8-bbe5-41ea-9f07-965ecf8b263b
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"011","RoleInstance":"DB1PEPF00043F21"}}
x-ms-resource-unit : 1
Date : Tue, 23 Jan 2024 18:31:17 GMT
Expected behavior
Debug Output
Set-MgOrganizationBrandingLocalizationBackgroundImage -OrganizationId $TenantId -InFile $DefaultYearImage -OrganizationalBrandingLocalizationId 0 -debug
DEBUG: [CmdletBeginProcessing]: - Set-MgOrganizationBrandingLocalizationBackgroundImage begin processing with parameterSet 'Set'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'.
DEBUG: [Authentication]: - Scopes: [AccessReview.Read.All, Agreement.Read.All, Analytics.Read, APIConnectors.Read.All, Application.Read.All, Application.ReadWrite.All, AppRoleAssignment.ReadWrite.All, AuditLog.Read.All, Channel.ReadBasic.All, ChannelMessage.Read.All, ChannelMessage.Send, ChannelSettings.Read.All, ChannelSettings.ReadWrite.All, Chat.ManageDeletion.All, Chat.ReadWrite, Community.ReadWrite.All, Contacts.ReadWrite, CrossTenantUserProfileSharing.Read, CrossTenantUserProfileSharing.Read.All, DelegatedPermissionGrant.ReadWrite.All, Directory.AccessAsUser.All, Directory.Read.All, Directory.ReadWrite.All, email, EntitlementManagement.Read.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, GroupMember.ReadWrite.All, IdentityProvider.Read.All, IdentityProvider.ReadWrite.All, IdentityRiskyUser.Read.All, IdentityRiskyUser.ReadWrite.All, IdentityUserFlow.Read.All, Mail.Read, Mail.ReadWrite, Mail.Send, Mail.Send.Shared, OnlineMeetingArtifact.Read.All, OnlineMeetings.Read, openid, Organization.Read.All, PeopleSettings.Read.All, PeopleSettings.ReadWrite.All, Place.Read.All, Policy.Read.All, Policy.Read.PermissionGrant, Policy.ReadWrite.ApplicationConfiguration, Policy.ReadWrite.ConditionalAccess, PrivilegedAccess.Read.AzureAD, PrivilegedAccess.Read.AzureResources, profile, Reports.Read.All, ReportSettings.ReadWrite.All, RoleAssignmentSchedule.Read.Directory, RoleAssignmentSchedule.ReadWrite.Directory, RoleEligibilitySchedule.Read.Directory, RoleManagement.Read.All, RoleManagement.Read.Directory, SecurityActions.ReadWrite.All, SecurityEvents.Read.All, SecurityEvents.ReadWrite.All, ServiceMessage.Read.All, SharePointTenantSettings.ReadWrite.All, Sites.FullControl.All, Sites.Manage.All, Sites.Read.All, Sites.ReadWrite.All, Tasks.Read, Team.ReadBasic.All, TeamSettings.Read.All, TeamsTab.Read.All, TeamworkTag.ReadWrite, User.Read, User.Read.All, User.ReadBasic.All, User.ReadWrite.All, UserAuthenticationMethod.Read.All, UserAuthenticationMethod.ReadWrite.All, VirtualEvent.Read].
Confirm
Are you sure you want to perform this action?
Performing the operation "Set-MgOrganizationBrandingLocalizationBackgroundImage_Set" on target "Call remote
'PUT
/organization/{organization-id}/branding/localizations/{organizationalBrandingLocalization-id}/backgroundImage
' operation".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
PUT
Absolute Uri:
https://graph.microsoft.com/v1.0/organization/b662313f-14fc-43a2-9a7a-d2e27f4f3478/branding/localizations/0/backgroundImage
Headers:
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22631; en-IE),PowerShell/7.4.0
Accept-Encoding : gzip
SdkVersion : graph-powershell/2.11.1
client-request-id : 73fb9c4e-8ada-4825-8224-11153e5eaf07
Body:
�����ExifMM☺↕♥☺☺☺→♣☺b☺♣☺☺(♥☺☻☺1☻(r☺2☻¶��i♦☺��-��'►-��'►Adobe Photoshop Elements 20.0 (Windows)2024:01:23 18:05:RH☺H☺����☻♦☺��♥♦☺♣♠☺♥♥☺♠☺→♣☺☺*☺♣☺☺☺(♥☺☻☻☺♦☺☺:☻☻♦☺
Adobe_CM☺��Adobed�☺���
◄
◄§
§↑‼‼§‼‼↑◄
◄
☺
►►¶¶¶¶◄
◄◄
◄
��k�♥☺"☻◄☺♥◄☺��♦
��☺?☺♣☺☺☺☺☺☺♥☺☻♦♣♠
☺☺♣☺☺☺☺☺☺☺☻♥♦♣♠
►☺♦☺♥☻♦☻♣♣♥
3☺☻◄♥♦!↕1♣AQa‼"q�2♠¶���B#$§R�b34r��C%�S���cs5▬���&D�TdE£t6↨�U�e���u��F'���������������Vfv��������7GWgw��������◄☻☻☺☻♦♦♥♦♣♠♠♣5☺☻◄♥!1↕♦AQaq"‼♣2��¶��B#�R��3$b�r��CS§cs4�%♠▬���&5��D�T�↨dEU6te����u��F���������������Vfv��������'7GWgw�������
♥☺☻◄♥◄?
k↕
�D�� j-i�'CMM�vRmN�§�[�T���▼wM���Շ7�H=�H�l♥�������. w
T���[��e��fAXe��?5b�W�:♦�K(�@�j3→�q?§i�>��q��U�YK��
v�|��Qk‼↑A�&���k4↨
Z�$Oòw►��F�k�∟m�uv w▲Z�����n�♥h x� }2��;♣↓��∟�O�D08�c5�(A Z_�Ё��7�<Q�¶Ň�����+�↨�☻R¶��♥DM�|‼Ih��∟�I♥J)¶J?I��P��!L;���‼%u�tk�N☺�=�z-:4h�״��$☻��#
�H�;���v�→tR▬���b���O��↕kkH♥�0��ԆK�U�+�}☺ k♠��♦���=�2���,���3�6�§[[→♥��∟ �*�ζ�"d����H�%g5�S*�6�)�N����l:6~hv��h ‼��q☺◄���i)�=�V♦��*��jYK,yp;g��♠�↨:v�����‼5�→���►d�5��0G�-N�X↔�-�9���{cM��(n�h�ִ▼↔U����d(�bN��"6↨8�a▼�_I‼8K��#!�-6V↔'�E�no��J){\�♥="8��▼r�g�♣����'t���L�Wuޯ%�\L�T"�(▬:�♠��� �\��2G�$Gv�%��§�����{�uWc���1�)z9g�:<�P↔K d�)� �♦'9�{ZC���‼��
�g�K���
9��♥�Q�Z.�.D�-�|Rk\�◄♥G☻O�4���↨�%���S=��GǴ���¶�Nr.♥�Q
q>ݦ|�m#P�k��D���x*�_��v���EkG��◄→���☺<IV�y~������▬�▼��#�k�N?�¶uE:▼k�☻↔.<���Ȃ���� ~?IQwR�=��▼ן��V}y���-�����{%�'Y��)�o}Pv_�w�<*�fc��fR�▲���N�-T݆��$▼#�����∟K��§�oZ�qoڜ��k�ŧ�����n�9���c��
��s\�
�Pb;;�̈o�>�cu►'�☻�����onH>,
v��f)��3(���^5��-q▼�o�w��Y�◄��↓!����Rt!eݙ��H�{C���}ϟ��Ϣ�=◄�_��♠�Y ����↕�9☻R♥��ly���l▼���c�e/m
s↔���↔L☺T�b\9�}��$���Dn9$υN▼��Ц:6�5�u�b���ߵ▼w►������yft[��ܻ↨}\�xpʷl�{�A��5d9�̆|��c�E�→2ܻ�pǰvY�p���'M��@���F�+�§►]�→������
�A�z�an��∟�l�!��D!�����i�♠♥:↔�����▲�ql�3�X���c��nڹ�Mޞ��+&♥�ё♦��;��=��∟�̬�
[�nc��Dd↔bƒ�♥�߀wOI�}֙�p���$:+G&g���$��:���
���������↔��}/��.��ُ��/��R�;���C�����↔���'���l}d�Q�ڏ�8��n�H��L
�↓'���������_���▼-�▼��1��r���~��UD5�<↕'�E����/�����Kn���-{D��♠�����3��ڻ�b��2�kt{^Hx��8f��fO�7e�ܞ���↔c�hkG�↓]U������ծ����u�-k;Yň&♦♥�}��"�+-�{s���ph���X;o�}]���SNf�� �
3���.�w {�����{g��y��{=7�▼�TN�0{��B�C�Q��bW��y♠C[SA������=�M�P:<�32♥c����▼��n��m�♣���♦���→4��0��61♥����\ ?�6G�
�
��V��;→mp$����'�u���_���+���}VH�↨►t�C�5�]+~�t��,ͽ��Kkc@��߹!�↨�����t��dž���xG
�_7�̷p ♦혏"�↑��↓][��S�dd�ʛ��Ih#�?C~��_W����F�n�♦~��☺?���R/�����:{ �/�����5P�>��ԧOD�mL���s+��\�O�w�=����ٱ^oHm� u
�►FͤGꙶ�YKc�78����Lr�\☺}�����Q����☻40XkkDh\��{U�C↓�m��=��▼�☻�/s��q�q�!�►♦F��2�u��zحѭ♦|�}��3F�;♣D↔�vD�5:�♦�B����o��☻TKˈ6♠�;�A��Dm<G♦↓��x�'�D�yB������▲r�^��{���☻c��%��:�JT�Jn↔��D�&%�<◄
◄§
§↑‼‼§‼‼↑◄
◄
☺
►►¶¶¶¶◄
◄◄
◄
��k�♥☺"☻◄☺♥◄☺��♦
��☺?☺♣☺☺☺☺☺☺♥☺☻♦♣♠
☺☺♣☺☺☺☺☺☺☺☻♥♦♣♠
►☺♦☺♥☻♦☻♣♣♥
3☺☻◄♥♦!↕1♣AQa‼"q�2♠¶���B#$§R�b34r��C%�S���cs5▬���&D�TdE£t6↨�U�e���u��F'���������������Vfv��������7GWgw��������◄☻☻☺☻♦♦♥♦♣♠♠♣5☺☻◄♥!1↕♦AQaq"‼♣2��¶��B#�R��3$b�r��CS§cs4�%♠▬���&5��D�T�↨dEU6te����u��F���������������Vfv��������'7GWgw�������
♥☺☻◄♥◄?
k↕
�D�� j-i�'CMM�vRmN�§�[�T���▼wM���Շ7�H=�H�l♥�������. w
T���[��e��fAXe��?5b�W�:♦�K(�@�j3→�q?§i�>��q��U�YK��
v�|��Qk‼↑A�&���k4↨
Z�$Oòw►��F�k�∟m�uv w▲Z�����n�♥h x� }2��;♣↓��∟�O�D08�c5�(A Z_�Ё��7�<Q�¶Ň�����+�↨�☻R¶��♥DM�|‼Ih��∟�I♥J)¶J?I��P��!L;���‼%u�tk�N☺�=�z-:4h�״��$☻��#
�H�;���v�→tR▬���b���O��↕kkH♥�0��ԆK�U�+�}☺ k♠��♦���=�2���,���3�6�§[[→♥��∟ �*�ζ�"d����H�%g5�S*�6�)�N����l:6~hv��h ‼��q☺◄���i)�=�V♦��*��jYK,yp;g��♠�↨:v�����‼5�→���►d�5��0G�-N�X↔�-�9���{cM��(n�h�ִ▼↔U����d(�bN��"6↨8�a▼�_I‼8K��#!�-6V↔'�E�no��J){\�♥="8��▼r�g�♣����'t���L�Wuޯ%�\L�T"�(▬:�♠��� �\��2G�$Gv�%��§�����{�uWc���1�)z9g�:<�P↔K d�)� �♦'9�{ZC���‼��
�g�K���
9��♥�Q�Z.�.D�-�|Rk\�◄♥G☻O�4���↨�%���S=��GǴ���¶�Nr.♥�Q
q>ݦ|�m#P�k��D���x*�_��v���EkG��◄→���☺<IV�y~������▬�▼��#�k�N?�¶uE:▼k�☻↔.<���Ȃ���� ~?IQwR�=��▼ן��V}y���-�����{%�'Y��)�o}Pv_�w�<*�fc��fR�▲���N�-T݆��$▼#�����∟K��§�oZ�qoڜ��k�ŧ�����n�9���c��
��s\�
�Pb;;�̈o�>�cu►'�☻�����onH>,
v��f)��3(���^5��-q▼�o�w��Y�◄��↓!����Rt!eݙ��H�{C���}ϟ��Ϣ�=◄�_��♠�Y ����↕�9☻R♥��ly���l▼���c�e/m
s↔���↔L☺T�b\9�}��$���Dn9$υN▼��Ц:6�5�u�b���ߵ▼w►������yft[��ܻ↨}\�xpʷl�{�A��5d9�̆|��c�E�→2ܻ�pǰvY�p���'M��@���F�+�§►]�→������
�A�z�an��∟�l�!��D!�����i�♠♥:↔�����▲�ql�3�X���c��nڹ�Mޞ��+&♥�ё♦��;��=��∟�̬�
[�nc��Dd↔bƒ�♥�߀wOI�}֙�p���$:+G&g���$��:���
���������↔��}/��.��ُ��/��R�;���C�����↔���'���l}d�Q�ڏ�8��n�H��L
�↓'���������_���▼-�▼��1��r���~��UD5�<↕'�E����/�����Kn���-{D��♠�����3��ڻ�b��2�kt{^Hx��8f��fO�7e�ܞ���↔c�hkG�↓]U������ծ����u�-k;Yň&♦♥�}��"�+-�{s���ph���X;o�}]���SNf�� �
3���.�w {�����{g��y��{=7�▼�TN�0{��B�C�Q��bW��y♠C[SA������=�M�P:<�32♥c����▼��n��m�♣���♦���→4��0��61♥����\ ?�6G�
�
��V��;→mp$����'�u���_���+���}VH�↨►t�C�5�]+~�t��,ͽ��Kkc@��߹!�↨�����t��dž���xG
�_7�̷p ♦혏"�↑��↓][��S�dd�ʛ��Ih#�?C~��_W����F�n�♦~��☺?���R/�����:{ �/�����5P�>��ԧOD�mL���s+��\�O�w�=����ٱ^oHm� u
�►FͤGꙶ�YKc�78����Lr�\☺}�����Q����☻40XkkDh\��{U�C↓�m��=��▼�☻�/s��q�q�!�►♦F��2�u��zحѭ♦|�}��3F�;♣D↔�vD�5:�♦�B����o��☻TKˈ6♠�;�A��Dm<G♦↓��x�'�D�yB������▲r�^��{���☻c��%��:�JT�Jn↔��D�&%�<DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
BadRequest
Headers:
Cache-Control : no-cache
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 9ecd54c3-1e2d-4ff3-8a16-02ebbf23458f
client-request-id : 73fb9c4e-8ada-4825-8224-11153e5eaf07
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"011","RoleInstance":"DB1PEPF00043F21"}}
x-ms-resource-unit : 1
Date : Tue, 23 Jan 2024 18:31:54 GMT
Body:
{
"error": {
"code": "Request_BadRequest",
"message": "Invalid Image Content-Type 'application/octet-stream'. Image Content-Type header should be one of the following: [image/bmp, image/jpg, image/jpeg, image/gif, image/vnd.microsoft.icon, image/png, image/exif, image/tif, image/tiff, image/, images/].",
"innerError": {
"date": "2024-01-23T18:31:55",
"request-id": "9ecd54c3-1e2d-4ff3-8a16-02ebbf23458f",
"client-request-id": "73fb9c4e-8ada-4825-8224-11153e5eaf07"
}
}
}
Set-MgOrganizationBrandingLocalizationBackgroundImage_Set: Invalid Image Content-Type 'application/octet-stream'. Image Content-Type header should be one of the following: [image/bmp, image/jpg, image/jpeg, image/gif, image/vnd.microsoft.icon, image/png, image/exif, image/tif, image/tiff, image/, images/].
Status: 400 (BadRequest)
ErrorCode: Request_BadRequest
Date: 2024-01-23T18:31:55
Headers:
Cache-Control : no-cache
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 9ecd54c3-1e2d-4ff3-8a16-02ebbf23458f
client-request-id : 73fb9c4e-8ada-4825-8224-11153e5eaf07
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"011","RoleInstance":"DB1PEPF00043F21"}}
x-ms-resource-unit : 1
Date : Tue, 23 Jan 2024 18:31:54 GMT
DEBUG: [CmdletEndProcessing]: - Set-MgOrganizationBrandingLocalizationBackgroundImage end processing.
Module Version
2.12
Tried with both the V1.0 and beta cmdlets. Same result.
This code using the Graph API works
$Uri = ("https://graph.microsoft.com/v1.0/organization/{0}/branding/localizations/0/backgroundImage" -f $TenantId)
Invoke-MgGraphRequest -Method PUT -Uri $Uri -InputFilePath $DefaultYearImage -ContentType "image/jpg"
Environment Data
Name Value
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: