microsoft-graph-toolkit icon indicating copy to clipboard operation
microsoft-graph-toolkit copied to clipboard

Support headers in mgt-get

Open beth-panx opened this issue 3 years ago • 8 comments

Proposal: Add support for headers in mgt-get

Description

To support api's such as List users beta

Rationale

There are times graph api supports passing of additional headers. Right now mgt-get doesn't have this as an option. Developer will need to overwrite the graph client to achieve this.

Preferred Solution

Add header attribute or property

beth-panx avatar Sep 22 '20 23:09 beth-panx

Hello beth-panx, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

msftbot[bot] avatar Sep 22 '20 23:09 msftbot[bot]

@beth-panx @shweaver-MSFT I would like to use mgt-get to get the manager chain up to the root level https://docs.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0&tabs=http#example-2-get-manager-chain-up-to-the-root-level, and that requires ConsistencyLevel: eventual be sent in the request headers. This is a feature I want to see!

MrCodeWeaver avatar Jan 19 '21 14:01 MrCodeWeaver

Agree, this features would make the component much better. What do you think about adding the header property like so:

<mgt-get resource="bla" headers="key:value, key:value" />

I believe this should be fairly straightforward to implement?

nmetulev avatar Jan 19 '21 22:01 nmetulev

That would be fine!

MrCodeWeaver avatar Jan 20 '21 12:01 MrCodeWeaver

Another reference: https://stackoverflow.com/questions/67766620/microsoft-graph-toolkit-mgt-how-do-i-modify-add-request-headers-for-the-mgt

nmetulev avatar Jun 01 '21 16:06 nmetulev