![]() ![]() ![]() ![]() Next, open one of the scripts that Dave has published on GitHub, for example here, and copy the function Get-AuthToken into your script. Rather than re-invent the wheel, we can use his functions to get the authentication token that we need.įirst, we need the AzureRM or Azure AD module installed as we use the authentication libraries that are included with it. A cool guy named Dave Falkus has published a number of PowerShell scripts on GitHub that use the Graph API with Intune, and these contain some code to authenticate with the API. To use the Graph API, you need to authenticate first. To find the data I needed, I had to query the Graph REST API using PowerShell, where I can take advantage of the greater filtering capabilities of PowerShell’s Where-Object. You can use the Microsoft Graph Explorer to query via the Graph REST API, however, the query capabilities of the API are still somewhat limited. ![]() So I turned to Microsoft Graph to get the data instead. Recently I needed to get a list of devices in both Azure Active Directory and Intune and I found that using the online portals I could not filter devices by the parameters that I needed. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |