Skip to content

Invoke-MgFilterRoleManagementDirectoryRoleEligibilityScheduleRequestByCurrentUser not generating URL correctly #2523

Open
@JustinGrote

Description

@JustinGrote

CC @peombwa

Related to:
#1255

And I suspect the related other commands that use this syntax do not work as well

Describe the bug
The command generates the request URL as
https://graph.microsoft.com/v1.0/roleManagement/directory/roleEligibilityScheduleRequests/microsoft.graph.filterByCurrentUser(on='principal')

When it should be:
https://graph.microsoft.com/v1.0/roleManagement/directory/roleEligibilityScheduleRequests/filterByCurrentUser(on='principal')

Reference Docs: https://learn.microsoft.com/en-us/graph/api/privilegedaccessgroupeligibilityschedule-filterbycurrentuser?view=graph-rest-beta&tabs=http

Note the removal of the microsoft.graph section.

To Reproduce
Steps to reproduce the behavior:

  1. Invoke-MgFilterRoleManagementDirectoryRoleEligibilityScheduleRequestByCurrentUser -on 'principal' -debug

Expected behavior
List of requests by user

Debug Output

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.

DEBUG: [CmdletBeginProcessing]: - Invoke-MgFilterRoleManagementDirectoryRoleEligibilityScheduleRequestByCurrentUser begin processing with parameterSet 'Filter'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: ''.
DEBUG: [Authentication]: - Scopes: [].
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://graph.microsoft.com/v1.0/roleManagement/directory/roleEligibilityScheduleRequests/microsoft.graph.filterByCurrentUser(on='principal')

Headers:
FeatureFlag                   : 00000043
Cache-Control                 : no-store, no-cache
User-Agent                    : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22635; en-US),PowerShell/2024.1.0
Accept-Encoding               : gzip
SdkVersion                    : graph-powershell/2.11.1
client-request-id             : fc39e141-230c-44a2-a128-ca2e8df8921b

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
InternalServerError

Headers:
Transfer-Encoding             : chunked
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : 0c612ba8-5c5b-406c-aef5-334b6931747e
client-request-id             : fc39e141-230c-44a2-a128-ca2e8df8921b
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"000","RoleInstance":"CO1PEPF000018B8"}}
Date                          : Fri, 12 Jan 2024 00:14:42 GMT

Body:
{
  "error": {
    "code": "InternalServerError",
    "message": "Unable to find target address",
    "innerError": {
      "date": "2024-01-12T00:14:42",
      "request-id": "0c612ba8-5c5b-406c-aef5-334b6931747e",
      "client-request-id": "fc39e141-230c-44a2-a128-ca2e8df8921b"
    }
  }
}

Module Version

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.11.1                Microsoft.Graph.Identity.Governance {Add-MgIdentityGovernanceAccessReviewDefinitionInstanceDecision, Get-MgAgreement, Get… 

Environment Data

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.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Microsoft Windows 10.0.22635
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AutoREST-dependencypriority:p1High priority/Major issue but not blocking or Big percentage of customers affected.Bug SLA <=7daystype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions