5

I'm trying to delete a custom schema from my G-Suite directory.

GET https://www.googleapis.com/admin/directory/v1/customer/my_customer/schemas?fields=schemas(schemaId%2CschemaName)&key={YOUR_API_KEY}

Response:

{
 "schemaId": "wAq9Qg4MR3-2Y647IvNb6w==",
 "schemaName": "SSO",
 "fields": [
  {
   "fieldId": "ZHzd3CDzQYmnEkJH9VDwhg==",
   "fieldName": "awsRole",
   "multiValued": true
  }
 ]
}

When trying to use the DELETE method I get the following:

DELETE https://www.googleapis.com/admin/directory/v1/customer/my_customer/schemas/SSO?key={YOUR_API_KEY}

Response:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Input: ZHzd3CDzQYmnEkJH9VDwhg=="
   }
  ],
  "code": 400,
  "message": "Invalid Input: ZHzd3CDzQYmnEkJH9VDwhg=="
 }
}

I'm using https://developers.google.com/apis-explorer/#s/admin/directory_v1/directory.schemas.delete in cases that matters, but the same happens when trying via: https://developers.google.com/admin-sdk/directory/v1/reference/schemas/delete.

I can't figure out what I'm doing wrong here. Confusingly enough, the Invalid input indicated in the error corresponds to the fieldId in the custom schema.

How do I delete the custom schema from my G Suite directory?

serverhorror
  • 779
  • 5
  • 21

1 Answers1

3

The schema can not be referenced in any SAML application attribute mapping. When you delete the mapping you can then delete the schema.

Carl Hörberg
  • 5,973
  • 5
  • 41
  • 47