Skip to content

Commit

Permalink
fixed byte read issue (#889)
Browse files Browse the repository at this point in the history
* fixed byte read issue #886

* doc update

* update

* fixed byte read issue #886

* doc update

* update

* beta doc update

---------

Co-authored-by: Steve Mutungi <[email protected]>
Co-authored-by: Kennedy Kang'ethe <[email protected]>
  • Loading branch information
3 people authored Jul 10, 2024
1 parent f5fc7d7 commit 78734bc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion module/Entra/customizations/Set-EntraApplicationLogo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
$logoBytes = (Invoke-WebRequest $($params.FilePath)).Content
}
elseif($isLocalFile){
$logoBytes = Get-Content $($params.FilePath) -Raw -Encoding Byte
$logoBytes = [System.IO.File]::ReadAllBytes($($params.FilePath))
}
else{
Write-Error -Message "FilePath is invalid" -ErrorAction Stop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
$logoBytes = (Invoke-WebRequest $($params.FilePath)).Content
}
elseif($isLocalFile){
$logoBytes = Get-Content $($params.FilePath) -Raw -Encoding Byte
$logoBytes = [System.IO.File]::ReadAllBytes($($params.FilePath))
}
else{
Write-Error -Message "FilePath is invalid" -ErrorAction Stop
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
title: Set-EntraBetaApplicationLogo
description: This article provides details on the Set-EntraBetaApplicationLogo command.
ms.service: active-directory

ms.service: entra
ms.topic: reference
ms.date: 06/26/2024
ms.author: eunicewaweru
ms.reviewer: stevemutungi
manager: CelesteDG
author: msewaweru

external help file: Microsoft.Graph.Entra.Beta-Help.xml
Module Name: Microsoft.Graph.Entra.Beta
online version:
Expand All @@ -17,51 +19,59 @@ schema: 2.0.0
# Set-EntraBetaApplicationLogo

## Synopsis

Sets the logo for an Application

## Syntax

### File (Default)

```powershell
Set-EntraBetaApplicationLogo
[-ObjectId <String>]
-ObjectId <String>
-FilePath <String>
[<CommonParameters>]
```

### ByteArray
### Stream

```powershell
Set-EntraBetaApplicationLogo
[-ObjectId <String>]
-ObjectId <String>
[<CommonParameters>]
```

### Stream
### ByteArray

```powershell
Set-EntraBetaApplicationLogo
[-ObjectId <String>]
-ObjectId <String>
[<CommonParameters>]
```

## Description

This cmdlet is used to set the logo for an application.

## Examples

### Example 1: Sets the application logo for the application specified by the ObjectID parameter

```powershell
PS C:\WINDOWS\system32> Set-EntraBetaApplicationLogo -ObjectId 79592454-dea7-4660-9d91-f1768e5055ac -FilePath D:\applogo.jpg
Connect-Entra -Scopes 'Application.ReadWrite.All'
Set-EntraBetaApplicationLogo -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -FilePath 'D:\applogo.jpg'
```

This cmdlet sets the application logo for the application specified by the ObjectID parameter to the image specified with the Filepath parameter.

## Parameters

### -FilePath
The file path of the file that is to be uploaded as the application logo

The file path of the file that is to be uploaded as the application logo.

```yaml
Type: String
Type: System.String
Parameter Sets: File
Aliases:

Expand All @@ -73,10 +83,11 @@ Accept wildcard characters: False
```
### -ObjectId
The ObjectID of the Application for which the logo is set.
```yaml
Type: String
Type: System.String
Parameter Sets: (All)
Aliases:

Expand All @@ -88,16 +99,20 @@ Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## Inputs

### System.String

System.IO.Stream System.Byte\[\]

## Outputs

### System.Object

## Notes
File uploads must be smaller than 500KB.

## Related Links

0 comments on commit 78734bc

Please sign in to comment.