I need to get the last sign in times of all users in a certain group for auditing purposes. I'm using the HTTP with Microsoft Entra ID (preauthorized) connector to connect to graph to try and get the signInActivity info. We are in GCC High so note that I'm using .us:
I keep getting the following error with any URL I try:
The error I'm getting just says "Action 'Invoke_an_HTTP_request' failed, but doesn't give any specific details.
The strange thing is that the output URL's work if I use them in graph PowerShell:
PS C:\Users\JeremyWade> $link = 'https://graph.microsoft.us/v1.0/users/fa0562e7-781b-4c2f-9f10-927ceffe8d15?$select=signInActivity'
PS C:\Users\JeremyWade> $response = Invoke-MGGraphRequest -Uri $link -Method Get
PS C:\Users\JeremyWade> $response.signInActivity.lastSuccessfulSignInDateTime
Thursday, April 3, 2025 4:30:00 AM
I also used the ManagePermissionGrant.ps1 script to authorize the connector to act on behalf of me, granting Directory.AccessAsUser.All, Directory.ReadWrite.All, and Directory.Read.All and set the env to USGov.
Any ideas why this is erroring?