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

New command: teams report directroutingcalls #1772

Closed
garrytrinder opened this issue Aug 20, 2020 · 15 comments
Closed

New command: teams report directroutingcalls #1772

garrytrinder opened this issue Aug 20, 2020 · 15 comments

Comments

@garrytrinder
Copy link
Member

garrytrinder commented Aug 20, 2020

Usage

teams report directroutingcalls [options]

Description

Get details about Direct Routing calls made within a given time period

Options

Option Description
--fromDateTime <fromDateTime> The start of time range to query. UTC, inclusive.
--toDateTime [toDateTime] The end time range to query. UTC, inclusive. Defaults to current DateTime if omitted
-o, --output [output] Output type. json,text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Additional Information

@aakashbhardwaj619
Copy link
Contributor

Hi All, I'd like to work on this.

@waldekmastykarz
Copy link
Member

Woot! All yours @aakashbhardwaj619 👏

@aakashbhardwaj619
Copy link
Contributor

Hi guys! Since this command requires a new permission scope CallRecords.Read.PstnCalls, I was trying it out using a custom AAD app registration in my tenant. But somehow, I can't find this permission scope when trying to grant Graph API permission access. Am I missing something here?

CallRecords Permission Missing

@waldekmastykarz
Copy link
Member

That would be a good question in the MS Graph docs

@garrytrinder
Copy link
Member Author

@aakashbhardwaj619 does it work with CallRecords.Read.All?

Agree with @waldekmastykarz that creating a question issue against the docs is the next step for raising this to the Graph team.

@aakashbhardwaj619
Copy link
Contributor

@garrytrinder It doesn't work with CallRecords.Read.All and I get Error: Access token is empty error when running the CLI command.

I just checked in the Graph docs that there is already an issue created for this missing permission scope. https://github.com/microsoftgraph/microsoft-graph-docs-contrib/issues/4758

@garrytrinder
Copy link
Member Author

garrytrinder commented Sep 1, 2020

Thanks for the update @aakashbhardwaj619

I’ve also reached out to the Graph team to see if this can be looked at, referencing the GH issue, this has been acknowledged so hopefully this will be resolved quickly.

Until then, let’s place this issue on hold until we hear of any progress.

@garrytrinder
Copy link
Member Author

Following the closure of https://github.com/microsoftgraph/microsoft-graph-docs/pull/9859 the permission required for this endpoint is now CallRecords.Read.All.

@waldekmastykarz
Copy link
Member

I'll add them to our AAD app after the PR is approved. Until then, during dev, @aakashbhardwaj619 you can use a custom AAD app.

@aakashbhardwaj619
Copy link
Contributor

Hi guys, I started working on this command but struggling with getting the appropriate access token. I've granted the CallRecords.Read.All application permission to my custom AAD app but when I try to execute the command, the access token I'm getting does not contain the CallRecords.Read.All scope in the scp value and only has the delegated permission scopes. Could anyone guide me on how to get the application permission scope using the device code flow?

Custom AAD App:
CustomAADApp

JWT Token:
JWTToken

@waldekmastykarz
Copy link
Member

You assigned an app-only permission so if you're authenticating with user credentials, that permission won't be included in the token.

@garrytrinder
Copy link
Member Author

@aakashbhardwaj619 you will need to authenticate using Certificate auth that uses a Custom Azure AD application that has the relevant app permission assigned to it.

I don't think we have any docs covering that scenario end to end, so something we should consider adding gong forwards.

I've found this article which may be able to help.

https://goodworkaround.com/2020/07/07/authenticating-to-azure-ad-as-an-application-using-certificate-based-client-credential-grant/

@garrytrinder
Copy link
Member Author

Hey @aakashbhardwaj619 👋🏻

How are you getting on with this command?

Feel free to reach out if you have any questions.

@garrytrinder
Copy link
Member Author

Discussed with @aakashbhardwaj619 offline, he's happy to let someone else take this on.

@leeford as discussed, this is all yours, thanks again for your help ❤️

@leeford
Copy link
Contributor

leeford commented Dec 22, 2020

Thank you, will get started 👍

@waldekmastykarz waldekmastykarz added this to the v3.4 milestone Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants