I want to access the Standard "System Administrator" profile using MetadataService.cls (found here https://github.com/financialforcedev/apex-mdapi)
Therefore I tried this
MetadataService.MetadataPort service = new MetadataService.MetadataPort();
service.SessionHeader = new MetadataService.SessionHeader_element();
service.SessionHeader.sessionId = UserInfo.getSessionId();
MetadataService.Profile profile
= ( MetadataService.Profile) service.readMetadata(
'Profile',
new String[] { 'System Administrator'}
).getRecords()[0];
Unfortunately profile is not populated by the readMetadata-method. It behaves exactly like a non-existing profile.
How the profile can be read?