1

I am trying to create schema extensions. I do have
"scp": "Directory.AccessAsUser.All" in token. Don't know for what reason it is failing.

https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/schemaextension_post_schemaextensions

POST https://graph.microsoft.com/beta/schemaExtensions
Content-type: application/json

{
"id":"courses",
"description": "Graph Learn training courses extensions",
"targetTypes": [
    "Group"
],
"properties": [
    {
        "name": "courseId",
        "type": "Integer"
    },
    {
        "name": "courseName",
        "type": "String"
    },
    {
        "name": "courseType",
        "type": "String"
    }
]
}

error :

 {
  "error": {
"code": "Service_InternalServerError",
"message": "Encountered an internal server error.",
"innerError": {
  "request-id": "1909aef3-b66d-48de-8204-0a41df0a27a8",
  "date": "2017-07-17T13:07:20"
}
 }
 }
Furqan Misarwala
  • 1,743
  • 6
  • 26
  • 53
  • 1
    FYI, see this SO Post: [Which Graph API should be used with Azure AD B2C](https://stackoverflow.com/questions/43770376/which-graph-api-should-be-used-with-azure-ad-b2c) – spottedmahn Feb 21 '18 at 00:02

1 Answers1

3

Unfortunately it looks like Microsoft Graph schema extensions is not supported in B2C tenant (please confirm if you are NOT using a B2C tenant - in which case this might be a different problem).

In the meantime (until we fix this issue), you'll need to use Azure AD Graph to register and use directory extensions.

Hope this helps,

Dan Kershaw - MSFT
  • 5,833
  • 1
  • 14
  • 23
  • 1
    Yes, I am using B2C Tenant, as per suggested by Microsoft, I am using Microsoft Graph instead of Azure AD Graph, I don't want to use two different implementation in my application for the same thing, so I prefer to use Microsoft Graph. Documentation doesn't say anything about, not to use B2C, poor documentation, It took my 3 days struggling and didn't success – Furqan Misarwala Jul 19 '17 at 05:02
  • 2
    Really apologize about this. B2C tenants are highly scalable and as such have some special features that we missed (or were not aware of) as part of integrating Microsoft Graph schema extensions. So this was a bit of a surprise to us as well (and is why this is not documented). – Dan Kershaw - MSFT Jul 19 '17 at 05:55
  • 1
    @DanKershaw-MSFT Is this still a limitation today? I would really like to use schema extensions to store metadata on security groups in a B2C tenant, in this case as a way to store custom permissions assigned to each group. – Lars Kemmann Dec 24 '20 at 15:54
  • Any update on the fix for this @DanKershaw-MSFT? – tiberriver256 Dec 06 '21 at 14:57