microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Microsoft.Graph.Files Doesn't work in Azure Automation
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 898
- Forks
- 230
- Ø Merge
- 2 T. 5 Std.
- Gemergte PRs (30 T.)
- 31
Beschreibung
Describe the bug
This is the same as the closed bug in https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2756
load the Microsoft.Graph.Files module into a runtime environment and attempt to use it. All attempts fail because cmdlets like Get-MgDriveItemContent cannot be found.
Expected behavior
The cmdlets should be found.
How to reproduce
Make sure that the runtime environment includes Microsoft.Graph.Files
Create a runbook to connect to the Graph with a managed identity (or any other way you like)
Run this code:
$FilesCmdlets = Get-Command -Module Microsoft.Graph.Files
If ($FilesCmdlets) {
Write-Output "Here's what I found for Files cmdlets"
$FilesCmdlets | Format-Table Name, Version
Write-Output ("{0} cmdlets found" -f $FilesCmdlets.count)
}
No cmdlets are found, but there are 1,252 in the module (the result when reported interactively). I guess some resource issue is being met.
SDK Version
2.38.1
Latest version known to work for scenario above?
The previous reports of the bug go back to 2.19
Known Workarounds
Only workaround is to use the Graph API requests
Debug output
Click to expand log
```</details>
### Configuration
Azure Automation
PowerShell 7.4 runtime environment
Microsoft.Graph.Files 2.38.1 module
### Other information
_No response_
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das Problem in einer Azure Automation PowerShell 7.4-Laufzeit mit Microsoft.Graph.Files 2.38.1 zu reproduzieren, indem du das bereitgestellte Runbook und die Prüfung Get-Command -Module Microsoft.Graph.Files verwendest. Vergleiche das Laufzeitergebnis mit dem interaktiven Modulverhalten und untersuche, warum die Cmdlets des Moduls nicht gefunden werden. Als erledigt gilt die Aufgabe, wenn die Files-Cmdlets, einschließlich Get-MgDriveItemContent, in der Laufzeit gefunden werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- azure, powershell
- Bereich
- cli, cloud
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100