It just takes a single resource at the moment. I’m not sure if we can specify multiple there or not due to the implementation of the Auth2.0 provider but could look into that if you need to get tokens for multiple services.
It would be handy,
As of now, the partnercenter module can connect, with the graph api. However trying to run any partnerrelated commands fail.
Replicated this by copying the Accesstoken to a console, and logged in. “Access denied”.
Either that, or i need to use the first token, to generate a partner token. Might be
Let me get back to you wether this is required or not.
I’m doing the same thing with CSP and UD - What I ended up doing is building some cmdlets that would auth to the CSP Partner Center - Also Since CSP has moved to the Secure Auth Model you will also need a service principal created and provide the consented permissions in the Graph.
For me, because UD Auth is different then CSP Auth, I have a refresh_token that is used to generate the token and auth to CSP, Graph, and ARM.
Also, your scope will need to include user_impersonation
So to get my CSP Bearer Token (Don’t mind the $ENV: Variables, I run UD in a Web App)
From here I can now POST/GET to the api.pertnercenter API to retrieve/update CSP Information.
Just remember in Azure there are a ton of scopes/resources you must use in order to create the Access Token with the correct “audience” or it will fail. You cannot POST to the OAuth2 Token API using multiple scopes/resources, each will need their own API call to retrieve the token. If we could have UD take in an array of the scopes and Auth using the First resource/scope, but then do something fancy on the backend to auth to the other resources without going through 5 login pages.