This will require a code change in PSU. Luckily, it’s already been merged and we need to do a release for a critical issue we just discovered in 1.5.11.
I’ll write up a formal tutorial for the blog but this is how you’ll do it. You need to enable permissions to O365 (or whatever resource you are trying to access) for your application in the app registration.
You also need to enable tokens in your authentication for your app registration.
Finally, you need to set the resource and response type appropriately in your appsettings.json for PSU. You also need to set SaveTokens to true. The resource URL is listed when you enable permissions in the Azure AD app registration. So depending on the resource, it will be a different URL.
"ResponseType": "id_token token",
Once this is done, you will have access to an $AccessToken and $IdToken variable in your dashboard.
It looks like
Connect-AzureAD has a couple parameters for access tokens. I’m not sure which one you will need to use.
This should work for O365, Graph and Azure management. I suspect 1.5.12 will go out today because the issue we just found is causing manually scheduled jobs to run 10x due to them failing and the service retrying the job…