Forum Discussion
bill-admin
Sep 20, 2024Copper Contributor
Mcgraph pop-up blocking entry
I am trying to activate the MgGraph module using the access token means in PowerShell.
The access token is generated using the tenant Id and client Id acquired on the PowerShell Microsoft Graph page.
PS C:\Windows\system32> $token = Get-MsalToken -TenantId $tenantId -ClientId $clientId -ClientSecret $secureClientSecret
PS C:\Windows\system32> $accessToken = ConvertTo-SecureString -String $token.AccessToken -AsPlainText -Force
PS C:\Windows\system32> Connect-MgGraph -AccessToken $accessToken
When I run these commands, I get a pop-up and I never enter MgGraph.
How can I skip the pop-up? Help
1 Reply
- Anthony_AntonacciCopper Contributornot sure what your are trying to do, but i created an application in Entra (AzureAD) and then connect using web request. if you use the connect-mggraph commands you need to install them first.... (i am not sure if gives you a token, i think it "logs you in" ....
Install-Module -Name Microsoft.Graph
Connect-MGGraph
Then it will ask you to login with your MS365 User....