cancel
Showing results for 
Search instead for 
Did you mean: 

Sample code for retrieving the existing Enrollment code for a Tenant

Former Member
0 Kudos

I have a already existing tenant & I would like to fetch already existing iOS Enrollment code.

Accepted Solutions (0)

Answers (2)

Answers (2)

jtaylor
Active Participant
0 Kudos

Hi, it doesn't really work directly like that, but I have some sample code which could help you get close:

Essentially, you use the ServerProprties service to call GetSelfServicePortalConfigurations, but pass it a GUID for an SSP that does not exist, and it will return all Portal configurations. You can then loop through those to get the code out of it as described in the document.

jtaylor
Active Participant
0 Kudos

One caveat of the above, and the following sample is that the codes have to be associated with an enrollment portal/SSP.

http://wiki.scn.sap.com/wiki/display/SAPMOB/GetSelfServicePortalConfigurations+-+Retrieve+Enrollment...

jtaylor
Active Participant
0 Kudos

If you do not care if the codes are associated with a policy, see the below for an example of how to open policies and get codes:

http://wiki.scn.sap.com/wiki/display/SAPMOB/EnrollmentGetPolicySettings%2C+OpenPolicy%2C+GetFirstPol...

Former Member
0 Kudos

I am having trouble understanding what you mean exactly.

From what I gather, you have another tenant that is not the sytem(default) tenant that has the iOS enrolment code on it.

You should be able to enrol you device anyway. The enrolment codes, regardless of the tenant that created it, navigate to the same enrolment pages on your server.

You as the user can identify which tenant created what enrolment code by moving between the tenats themselves. However, the devices don't really "care" who created it.

I hope that helps.

Former Member
0 Kudos

I am looking for Sample Code using API's. There is an existing Tenant for which Enrollment code is already being generated once. So when I send that Tenant Name as an parameter, I should fetch the existing enrollment code(Tiny URL Code)

jtaylor
Active Participant
0 Kudos

Did the below information help you achieve what you were looking for?