Azure / Azure/azure-rest-api-specs
graphrbac doesn't have signed-in use (me) operations
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
This has been open for sometime as Azure/azure-sdk-for-go#698.
As written by @chessman:
> Graph API has Signed-in user operations:
https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/signed-in-user-operations
>
>I use a workaround now:
> ```go
> func Me(authorizer autorest.Authorizer) (graphrbac.User, error) {
> uclient := graphrbac.NewUsersClient("myorganization")
> uclient.Authorizer = authorizer
>
> req, _ := uclient.GetPreparer("")
> r := strings.NewReplacer("users", "me")
> req.URL.Path = r.Replace(req.URL.Path)
>
> resp, err := uclient.GetSender(req)
> if err != nil {
> return graphrbac.User{}, err
> }
>
> return uclient.GetResponder(resp)
>}
>```
The right fix to this would be to add operations in the Swagger under a separate path.
Contributor guide
Research direction
Start with the linked signed-in user operations documentation and the graphrbac UsersClient workaround, then compare them with the existing graphrbac specification. Add the signed-in user operations under a separate Swagger/OpenAPI path, with completion defined by the specification exposing the documented `me` operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100