Developer portal users are not registered with api gateway

Not applicable

Hi,

I'm using the Drupal cas module: https://www.drupal.org/project/cas to register users and create their accounts in Drupal. This part works properly. The issue that I'm running into is that a user can't create an app. The error message that I get in Drupal is:

{ "code" : "developer.service.DeveloperIdDoesNotExist", "message" : "DeveloperId apps does not exist in organization oregonstateuniversity", "contexts" : [ ] }

How are Drupal users registered to the api gaeway? Is there a hook or workflow? Could somebody point me to the source code in the devconnect modules that does the work?

Thanks,

José

Solved Solved
0 3 828
1 ACCEPTED SOLUTION

Dear @jose.cedeno ,

Apigee developer portal talks to Apigee Edge using Management APIs. When a user gets created in developer portal same details will be sent to Apigee Edge. In your case, I would first check an user (Developer)with same email exist or not in Apigee Edge.

In Apigee Developer Portal , devconnect_user module (profiles/apigee/modules/custom/devconnect/devconnect_user) is responsible for sync between Apigee Edge & Developer Portal. It also exposes hooks to extend functionality in other custom modules. You can find hooks exposed by devconnect_user module in module *.api.php file.

Users gets created in Apigee edge using hook_user_presave implemented in devconnecte_user/devconnect_user.user.inc file.

Make sure your Portal & Apigee edge is connected by navigating to "admin/config/devconnect" page. You should see connection successful message like below.

1913-screen-shot-2016-02-10-at-95155-am.png

For some reason few users / user is missing in edge, you can manually sync users by navigating to "admin/people" page and click on "Dev Portal developer sync"

1914-screen-shot-2016-02-10-at-95324-am.png

Keep us posted if any queries.

PS: DO NOT hack core / Apigee profile files, use custom modules.

View solution in original post

3 REPLIES 3

Dear @jose.cedeno ,

Apigee developer portal talks to Apigee Edge using Management APIs. When a user gets created in developer portal same details will be sent to Apigee Edge. In your case, I would first check an user (Developer)with same email exist or not in Apigee Edge.

In Apigee Developer Portal , devconnect_user module (profiles/apigee/modules/custom/devconnect/devconnect_user) is responsible for sync between Apigee Edge & Developer Portal. It also exposes hooks to extend functionality in other custom modules. You can find hooks exposed by devconnect_user module in module *.api.php file.

Users gets created in Apigee edge using hook_user_presave implemented in devconnecte_user/devconnect_user.user.inc file.

Make sure your Portal & Apigee edge is connected by navigating to "admin/config/devconnect" page. You should see connection successful message like below.

1913-screen-shot-2016-02-10-at-95155-am.png

For some reason few users / user is missing in edge, you can manually sync users by navigating to "admin/people" page and click on "Dev Portal developer sync"

1914-screen-shot-2016-02-10-at-95324-am.png

Keep us posted if any queries.

PS: DO NOT hack core / Apigee profile files, use custom modules.

Not applicable

I was able to figure out the issue. Through using grep I was able to devconnect and devconnect_user modules mentioned in the previous answer. The issue I had was that I was using test accounts from our organization to login to the developer portal. These accounts didn't have an email set. That was causing the accounts to not be provisioned as as developer accounts in Edge.

Once I configured the CAS and CAS Attributes module to fill in a default email, the accounts were provisioned properly. Figuring out the issue was complicated since there was no error or warning added to the watchdog logs 😞 . I had to read through the code and put some debugging statements.

@asagarapigeecom I appreciate the detailed answer and pictures. I agree with the Drupal rule, never hack core 🙂 . I reverted back all the commits that I had used to put debugging statements.

Awesome @jose.cedeno , Glad issue is resolved.