Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-MgEntitlementManagementAssignmentPolicyQuestion Errors #3025

Open
Celticview opened this issue Nov 8, 2024 · 1 comment
Open

Get-MgEntitlementManagementAssignmentPolicyQuestion Errors #3025

Celticview opened this issue Nov 8, 2024 · 1 comment
Labels
Service issue status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close

Comments

@Celticview
Copy link

Describe the bug

I am running the following to retrieve the list of questions from the assignment policy ID listed but the URL the cmdlet calls in the Graph API also fails in Graph Explorer.

Get-MgEntitlementManagementAssignmentPolicyQuestion -AccessPackageAssignmentPolicyId '229ec9e8-98c8-41e3-a01a-9395c5b5e5ab' -debug

This executes the request which does not work in Graph Explorer and produces the same error as the cmdlet:

https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/assignmentPolicies/229ec9e8-98c8-41e3-a01a-9395c5b5e5ab/questions

This works in Graph Explorer however:

https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/assignmentPolicies/229ec9e8-98c8-41e3-a01a-9395c5b5e5ab?$select=questions

This produces the following debug trace:

Expected behavior

cmdlet should return the access package assignment policy questions list.

How to reproduce

a. $TenantId = ‘<tenant_ID>’
b. connect-mggraph -tenantId $TenantId -Scopes "EntitlementManagement.ReadWrite.All"
c. import-module Microsoft.Graph.Identity.Governance -MinimumVersion 2.24.0
c. Get-MgEntitlementManagementAssignmentPolicyQuestion -AccessPackageAssignmentPolicyId '<policy_id>' -debug

SDK Version

2.24.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log DEBUG: [CmdletBeginProcessing]: - Get-MgEntitlementManagementAssignmentPolicyQuestion begin processing with parameterSet 'List'. DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'. DEBUG: [Authentication]: - Scopes: [Application.Read.All, AppRoleAssignment.ReadWrite.All, AuditLog.Read.All, Device.ReadWrite.All, DeviceManagementManagedDevices.ReadWrite.All, DeviceManagementServiceConfig.ReadWrite.All, Directory.Read.All, EntitlementManagement.ReadWrite.All, Group.ReadWrite.All, GroupMember.ReadWrite.All, openid, profile, RoleManagement.ReadWrite.Directory, Sites.FullControl.All, User.Read, User.ReadWrite.All, email]. DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/assignmentPolicies/229ec9e8-98c8-41e3-a01a-9395c5b5e5ab/questions

Headers:
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.19045; en-GB),PowerShell/7.4.6
Accept-Encoding : gzip
SdkVersion : graph-powershell/2.24.0
client-request-id : cd368f5b-81d2-4df0-80c8-fdbd1dfbcc0f

Body:

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

Status Code:
NotFound

Headers:
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : ef5d50a7-f4bf-4395-b2be-97df0af909c0
client-request-id : cd368f5b-81d2-4df0-80c8-fdbd1dfbcc0f
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"5","ScaleUnit":"004","RoleInstance":"LO1PEPF00003239"}}
Date : Fri, 08 Nov 2024 16:27:11 GMT

Body:
{
"error": {
"code": "",
"message": "No HTTP resource was found that matches the request URI 'https://igaelm-asev3-ecapi-neu.igaelm-asev3-environment-neu.p.azurewebsites.net/api/v1/assignmentPolicies('229ec9e8-98c8-41e3-a01a-9395c5b5e5ab')/questions'.",
"innerError": {
"date": "2024-11-08T16:27:12",
"request-id": "ef5d50a7-f4bf-4395-b2be-97df0af909c0",
"client-request-id": "cd368f5b-81d2-4df0-80c8-fdbd1dfbcc0f"
}
}
}

Get-MgEntitlementManagementAssignmentPolicyQuestion_List: No HTTP resource was found that matches the request URI 'https://igaelm-asev3-ecapi-neu.igaelm-asev3-environment-neu.p.azurewebsites.net/api/v1/assignmentPolicies('229ec9e8-98c8-41e3-a01a-9395c5b5e5ab')/questions'.

Status: 404 (NotFound)
ErrorCode:
Date: 2024-11-08T16:27:12

Headers:
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : ef5d50a7-f4bf-4395-b2be-97df0af909c0
client-request-id : cd368f5b-81d2-4df0-80c8-fdbd1dfbcc0f
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"5","ScaleUnit":"004","RoleInstance":"LO1PEPF00003239"}}
Date : Fri, 08 Nov 2024 16:27:11 GMT

DEBUG: [CmdletEndProcessing]: - Get-MgEntitlementManagementAssignmentPolicyQuestion end processing.

Configuration

Name Value


PSVersion 7.4.6
PSEdition Core
GitCommitId 7.4.6
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Other information

No response

@Celticview Celticview added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Nov 8, 2024
@timayabi2020
Copy link
Contributor

Hi @Celticview thank you for logging this issue. The cmdlet is generated based on the open API description as defined by the service owner. If the path is returning a 404 then we can only conclude that this is an issue to do with the service and unfortunately, for API related issues/questions we are not best placed to give an answer. Kindly raise an issue here https://developer.microsoft.com/en-us/graph/support so that the API owner can respond to it.

The alternative cmdlet would be to use Get-MgEntitlementManagementAssignmentPolicy -Property questions. It will formulate the request that was working for you.

@timayabi2020 timayabi2020 added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close Service issue and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service issue status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close
Projects
None yet
Development

No branches or pull requests

2 participants