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

AuthorizationPolicyRequestBuilder missing Patch #899

Open
gardarkj opened this issue Sep 6, 2024 · 0 comments
Open

AuthorizationPolicyRequestBuilder missing Patch #899

gardarkj opened this issue Sep 6, 2024 · 0 comments
Labels
dependency:metadata Awaiting fix from core dependency project module type:bug A broken experience

Comments

@gardarkj
Copy link

gardarkj commented Sep 6, 2024

Describe the bug

AuthorizationPolicy does not include the required PatchAsync method to update the policy.
PostAsync method is available but the endpoint does not support POST for updating.
ToPatchRequestInformation method is also unavailable.

Seems like the url is also "wrong" when Posting as it should be "policies/authorizationPolicy/authorizationPolicy"
according to: https://github.com/microsoftgraph/microsoft-graph-docs-contrib/blob/main/api-reference/beta/api/authorizationpolicy-update.md

Expected behavior

Having the Patch methods available to update the policy.
client.Policies.AuthorizationPolicy.PatchAsync(graphObject)
client.Policies.AuthorizationPolicy.ToPatchRequestInformation(graphObject)

How to reproduce

Review Microsoft.Graph.Beta.Policies.AuthorizationPolicy.AuthorizationPolicyRequestBuilder
The only available related methods are Get and Post (which the endpoint does not support)

SDK Version

5.79.0-preview

Latest version known to work for scenario above?

None

Known Workarounds

var pReq = client.
Policies.
AuthorizationPolicy.
WithUrl("https://graph.microsoft.com/beta/policies/authorizationPolicy/authorizationPolicy").
ToPostRequestInformation((AuthorizationPolicy)graphResource);

pReq.HttpMethod = Microsoft.Kiota.Abstractions.Method.PATCH;
await client.RequestAdapter.SendAsync(resPostReq, AuthorizationPolicy.CreateFromDiscriminatorValue);

Debug output

Nothing to show here since the methods are unavailable

Configuration

  • MacOS Sonoma 14.6.1
  • ARM64

Other information

No response

@gardarkj gardarkj added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Sep 6, 2024
@shemogumbe shemogumbe added dependency:metadata Awaiting fix from core dependency project module and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency:metadata Awaiting fix from core dependency project module type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

2 participants