mosen/ccp-recipes

orgName is hard to find

Closed this issue · 6 comments

Had a message in the Slack channel about finding their orgName. It seems Adobe has stopped putting the OrganizationName element in Contents/Resources/optionXML.xml. The following should be a valid solution. It requires Adobe CCP to be launched once and sign in but that's a requirement for these recipes already.

cat ~/Library/Logs/PDApp.log | grep "orgName"

greping that log will also give you the orgType which might be a helpful README update as well.

I can do a PR if the above sounds good.

This seems like a reasonable fallback if someone hasn't provided one explicitly, provided we search the log and pick the last match (which we hope means that it's the last successful sign-in). I think we'll want to make sure we still log the result with self.output().

And it's entirely possible that doing this is reliable enough that there wouldn't really be a situation where it would make sense to explicitly define an org name in the override (besides perhaps for documentation purposes).

I've already found a problem with this solution which is why I didn't make a PR to start out. Since you can use Adobe ID's that aren't associated with an organization the log statement that I'm pointing to won't be present.

This is at least true for enterprise licensing that uses a serial and I believe also true for creating named packages.

It does seem like it might be a good enhancement for an auto detect on the orgName

  1. Launch CCP
  2. Create the log and parse the INFO statement if it exists.

The message that will need to be parsed if we went forward with that solution:

03/03/17 09:01:29:378 | [INFO] |  | ASU | EnterpriseNative | EnterpriseNative |  |  | 336573 | CCP IMS OrgDetails return status is (0) server-response([{"orgName":"MY VALID ORG","orgRef":{"ident":"9AAAAAAABBBBBBBBBBBBAAAA","authSrc":"AdobeOrg"},"orgType":"Enterprise","groups":[{"groupName":"Administrators","role":"GRP_ADMIN","ident":1111111}]}])

But if you use an Adobe ID which isn't associated with org, can CCP still be fully automated to build a package?

I think it's also reasonable for us to limit the scope of these recipes to only supporting admin logins which are actually associated with an org. It seems like a weird accident that any Adobe ID can log in and build a package under the "Enterprise" package mode of CCP.

mosen commented

Nope, macmule had an ID which was once associated with an org but disconnected now, CCP refused to build.

Closing via a732bc6