Make use of the Microsoft Graph API rather than updating the AAD API Endpoint.
You're effectively investing time that's going to be redundant as a rewrite will be required when the Azure AD API reaches EOL.
Learning some Golang atm to contribute but food for thought.
Hi @jdelforno thanks for this issue, but I did not quite understand what you are referring to. Can you be more specific?
Hi @jdelforno thanks for this issue, but I did not quite understand what you are referring to. Can you be more specific?
Hey @ArcturusZhang
The Azure AD Graph API ( https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-graph-api ) has been deprecated by Microsoft.
Important
We strongly recommend that you use Microsoft Graph instead of Azure AD Graph API to access Azure Active Directory (Azure AD) resources. Our development efforts are now concentrated on Microsoft Graph and no further enhancements are planned for Azure AD Graph API. There are a very limited number of scenarios for which Azure AD Graph API might still be appropriate; for more information, see the Microsoft Graph or the Azure AD Graph blog post and Migrate Azure AD Graph apps to Microsoft Graph.
As the code states it's using the Azure AD Graph API (graph.windows.net), it should be mentioned somewhere that a refactor is required against those items that require it and to make use of the MS Graph API in future (https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0).
Otherwise, people may look at the Azure AD API, get it confused with the MS Graph API and draw the wrong conclusions.
Cheers,
John
Hi @jhendrixMSFT could you bring some context about this?
@jdelforno hello! The contents of this SDK (excluding the ./storage package) are auto-generated from swagger files in the azure-rest-api-specs repo. If we want to mark the graphrbac package as deprecated it must come from being declared as such in the swagger.
@ArcturusZhang Do we have a swagger for the MS Graph APIs yet?
@jdelforno hello! The contents of this SDK (excluding the
./storagepackage) are auto-generated from swagger files in the azure-rest-api-specs repo. If we want to mark thegraphrbacpackage as deprecated it must come from being declared as such in the swagger.@ArcturusZhang Do we have a swagger for the MS Graph APIs yet?
Well, when I search the end point of MS Graph graph.microsoft.com in azure-rest-api-specs, I got nothing. I would say there is no swagger for MS Graph APIs yet
Hi @ArcturusZhang @jhendrixMSFT,
I don't know if you can move away swagger for some part of this sdk but may be you should have a look at this project : https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator
Looks like this tools is used to generate the code for others sdk, may be it can be used to generate the graph API part of this ?
@phenixdotnet See https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/issues/53, there is no Golang generator in that project and none has been made yet since it was suggested in 2016.
@sirlatrom yes I know that but if the MSGraph code generator is still the way to go (CF https://github.com/microsoftgraph/msgraph-sdk-design/issues/28), it could be possible to write the necessary t4 to get a go sdk. (actually I have a POC with that by the way).
Just need to be sure the MSGraph code generator is not dead and a PR with go lang support would be accepted.
Given the Odata information is available here: https://graph.microsoft.com/v1.0/$metadata
Can we somehow convert it via https://github.com/rbeauchamp/Swashbuckle.OData or https://github.com/oasis-tcs/odata-openapi/tree/master/tools#transformjs-for-nodejs to get the desired outcome?
The answer to the above was yes, use: https://github.com/oasis-tcs/odata-openapi/blob/master/tools#transformjs-for-nodejs
Which generates an OpenAPI 3.0 document.
Then use autorest from https://github.com/Azure/AutoRest
To start generating Go.
Fingers crossed..
And for your information, there is a community SDK of msgraph in golang here
MSgraph team develops their own code generator but it does not support golang: https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator
AutoRest doesn't really like OpenAPI 3.0 yet it seems. Adding the -o 2.0 switch to the XLST transform. Trying again.
@ArcturusZhang I recognise and acknowledge both points. However, I won't be programming in Go, I'm only be hoping to have the Terraform Azure AD Provider updated.
Which to my knowledge, they won't use anything that's not part of the Azure repo as a whole =)
@jdelforno If you are looking for OpenAPI documents that will work with AutoREST, we have these here https://github.com/microsoftgraph/msgraph-sdk-powershell/tree/dev/openApiDocs that we use for the AutoREST PowerShell generation.
We can generate V2 versions of these if the Go generator requires V2. We haven't made a commitment to do Go for Graph yet, but we are investing in our code generation tech this semester so Go support is definitely within the realm of possibility.
Hey @darrelmiller , do you have some news about the Go support for SDK generation?
Also, @phenixdotnet, you say you have a POC, could you share it?
Most helpful comment
AutoRest doesn't really like OpenAPI 3.0 yet it seems. Adding the -o 2.0 switch to the XLST transform. Trying again.
@ArcturusZhang I recognise and acknowledge both points. However, I won't be programming in Go, I'm only be hoping to have the Terraform Azure AD Provider updated.
Which to my knowledge, they won't use anything that's not part of the Azure repo as a whole =)