I want to automate one task in Office 365 by using powershell and for this I registered an app in AAD (V2 endpoint https://apps.dev.microsoft.com) and given access to MS Graph API with permissions "Have full access to all site collections", "Read and Write all groups" (and so on) access to the app. I am able to get the O365 group details via below PnP powershell commands but I am not sure how to get the context of SharePoint site or how to connect to a SP site within the same PS script by utilizing the same App credentials.
Connect-PnPOnline -AppId '<App Id>' -AppSecret '<App Secret>' -AADDomain 'tenant.onmicrosoft.com'
$group = Get-PnPUnifiedGroup -Identity 'hello team'
$spSiteUrl = $group.SiteUrl
Any tips how can I connect to SPO site?