microsoftgraph / microsoftgraph/msgraph-sdk-powershell

Broken Absolute URI referenced by New-MGBetaDeviceManagementconfigurationPolicyAssignment

Offen
#3,219 2 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Dependency: metadata-issue type:bug
Vorherrschende Sprache
C#
Sterne
898
Forks
230
Ø Merge
2 T. 5 Std.
Gemergte PRs (30 T.)
31

Beschreibung

Describe the bug

I am from Microsoft internal team and recently came across a broken reference of the absolute URI with the New-MgBetaDevicemanagementConfigurationPolicyAssignment PS cmdlet. The PS cmdlet is running into a HTTP 400 error and the same absolute URI that is referenced by this cmd is returning HTTP 400 on Graph-

Absolute URI pointed by the PS command - /deviceManagement/configurationPolicies/{deviceManagementConfigurationPolicy-id}/assignments - Same URI returns HTTP 400 on Graph also

After capturing the network trace on the Intune portal we received the correct URI which returns HTTP 200 on Graph- Correct URI - https://graph.microsoft.com/beta/deviceManagement/configurationPolicies('')/assign

While we already have the workaround script with Invoke-MgGraphRequest and using the correct URI, there is still this bug with this PS cmdlet that customers might want to use to ensure uniformity across their script.

Expected behavior

PS cmdlet should point to the correct URI and give HTTP 200 as per the MS docs.

How to reproduce
  1. Execute New-MGBetaDeviceManagementconfigurationPolicyAssignment command with appropriate permissions.
  2. Returns HTTP 400 on PS command as well as on Graph (with the URI referenced by this cmd)
SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

Invoke-MgGraphRequest can be used as a workaround.

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie damit, New-MGBetaDeviceManagementconfigurationPolicyAssignment zu reproduzieren, und vergleichen Sie dessen referenzierte URI mit der funktionierenden Graph-URI aus dem Issue. Verfolgen Sie, wo das Cmdlet diese Anfrage erstellt; abgeschlossen ist die Aufgabe, wenn es die korrigierte /assign-URI verwendet und HTTP 200 statt HTTP 400 zurückgibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, powershell
Bereich
api
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.